Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(mobile): pages #9246

Merged
merged 9 commits into from May 5, 2024
Merged

refactor(mobile): pages #9246

merged 9 commits into from May 5, 2024

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented May 3, 2024

  • Moved pages to top level pages directory
  • Nesting pages based on relationships in the app
  • Shared page like create_album_page.dart is under common directly
    image

@alextran1502 alextran1502 changed the title mobile/refactor pages refactor(mobile): pages May 3, 2024
Copy link

cloudflare-pages bot commented May 3, 2024

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 51f3c82
Status: ✅  Deploy successful!
Preview URL: https://0e6a9214.immich.pages.dev
Branch Preview URL: https://mobile-refactor-pages.immich.pages.dev

View logs

@jrasm91
Copy link
Contributor

jrasm91 commented May 3, 2024

would it make sense to have pages named about.page.dart and things like models to have user.model.dart? That is how the server works and I think it is quite nice (asset.service.ts)

@martyfuhry
Copy link
Contributor

I generally prefer the module approach, where each module would have its own pages/ directory. The web project in this repo doesn't have this structure, either. In any case, I'm sure this is fine, it's just a reorganization and it makes sense to do it like this.

@martyfuhry
Copy link
Contributor

would it make sense to have pages named about.page.dart and things like models to have user.model.dart? That is how the server works and I think it is quite nice (asset.service.ts)

That would be a find idea, too. I think you can even tell AutoRouter to automatically generate routes based on class name, maybe you can do the same with file name suffixes.

@jrasm91
Copy link
Contributor

jrasm91 commented May 3, 2024

The svelte-kit library that we use for the web actually uses the location of source files within the src/routes folder to actually change the routing functionality for the app, so it is a bit different, yeah.

@alextran1502 alextran1502 merged commit 090592e into main May 5, 2024
24 checks passed
@alextran1502 alextran1502 deleted the mobile/refactor-pages branch May 5, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants