Skip to content

refactor: asset-grid, actions #19238

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

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

refactor: asset-grid, actions #19238

wants to merge 5 commits into from

Conversation

midzelis
Copy link
Collaborator

Improve general timeline components, breaking up the huge components into smaller chunks. Will try to group changes into smaller commits within this PR.

@jrasm91
Copy link
Contributor

jrasm91 commented Jun 20, 2025

I'd probably try to do the component refactoring first and move it later, otherwise you will constantly end up with conflicts for anything and everything that's also changed in the asset-grid file.

midzelis added 2 commits June 21, 2025 00:12
…mponent

Separated scrubber logic into asset-grid component, creating a
asset-grid-without-scrubber for modularity. Names not final yet,
much more left to do.
@midzelis
Copy link
Collaborator Author

midzelis commented Jun 21, 2025

Not sure I follow what your saying. My technique is to break apart everything into smaller chunks, and then shift and move things until they make sense. This is not final by any stretch. i.e. the actions won't use bind mounts in the final result, rather the'll be passed in from the parent.

I'm starting to settle on 'timeline' as the main replacement for 'asset-grid' which will contain all the actions/sections/behavior (but more modular) as asset-grid does today. Then there will be a timeline-viewer component, which is just the viewer, no scrubber. And then a timeline-scrubber - which includes the scrubber. The scrubber itself will likely remain as it is.

The actions will be modularized, and made reusable (sharing the keyboard shortcuts and the action menu item logic). DateGroup will be renamed to photo-group, or similar.

After all this is all done, I'm thinking of making the timeline more generic, and not necessarily focused on time. i.e. imagine showing all the albums as one stream, but divisions where the albums name. At that point, I may end up extracting a 'photo-stream' component away from the 'timeline' which would end up being just a specialization of photo-stream. A

nd, at some point, and I'm going to extract away the data-loader parts of the timeline. So, you can supply the photos in alternative ways. i.e. imagine a totally static/standalone component, where the data comes from a json file. then timeline becomes a true component, maybe even something in @immich/ui (but probably not)

oh, and i'm going to take this slow

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.

2 participants