20 Commits

Author SHA1 Message Date
Min Idzelis
69880ee165
fix: deep link to last asset (#23920) 2025-11-17 14:12:07 -06:00
Daniel Dietzler
c76324c611
fix(web): mobile scrubber on page load (#23488) 2025-11-01 22:15:33 -05:00
Min Idzelis
c666dc6c67
fix: back/forward navigation won't reset scroll in timeline (#22838)
* fix: back/forward navigation won't reset scroll in timeline

Fixes a bug where navigating to/from the asser-viewer from timeline causes the scroll position to be reset.

* Fix back after assetviewer next/prev navigation

* Bug fix from review

* review comments
2025-10-27 08:56:03 -05:00
Min Idzelis
04e2e42c88
refactor(web): improve date labels in scrubber (#23046)
refactor(web): improve timeline scrubber labeling logic

Refactor the segment calculation in the timeline scrubber to improve code clarity and fix label positioning. Process months in reverse order for more intuitive label selection, use descriptive variable names, and remove unnecessary index tracking.
2025-10-20 22:13:49 -05:00
Min Idzelis
3174a27902
refactor(web): Extract VirtualScrollManager base class from TimelineManager (#23017)
Extract common virtual scrolling functionality from TimelineManager into
a new abstract VirtualScrollManager base class. This refactoring improves
code organization and enables reuse of virtual scrolling logic.

Changes:
- Create new VirtualScrollManager abstract base class with common virtual
  scrolling state and methods
- Refactor TimelineManager to extend VirtualScrollManager
- Rename 'assetsHeight' to 'bodySectionHeight' for semantic clarity
- Convert methods to use override keyword where appropriate
- Enable noImplicitOverride in tsconfig for better type safety
- Fix ApiError and AbortError class definitions with override keywords
2025-10-17 17:37:54 +00:00
Min Idzelis
2919ee4c65
fix: navigate to time action (#20928)
* fix: navigate to time action

* change-date -> DateSelectionModal; use luxon; use handle* for callback fn name

* refactor change-date dialogs

* Review comments

* chore: clean up

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
2025-10-16 17:44:09 +00:00
Min Idzelis
b3055d2e94
refactor: TimelineManager is owned by Timeline.svelte (#22839)
feat: TimelineManager is owned by Timeline.svelte
2025-10-15 17:27:44 +00:00
Min Idzelis
f1e03d0022
fix(web): improve scrubber behavior on scroll-limited timelines (#22917)
Improves scroll indicator positioning when scrubbing through timelines with limited scrollable content (e.g., small albums). When a timeline's scrollable height is less than 50% of the viewport height, the scroll position is now properly distributed across the entire scrubber height, making the indicator more responsive and accurate.

Changes:
- Add `limitedScroll` state to detect scroll-constrained timelines (threshold: 50%)
- Introduce `ViewportTopMonth` type to handle lead-in/lead-out sections
- Calculate `totalViewerHeight` including top/bottom sections for accurate positioning
- Refactor scrubber to treat lead-in and lead-out as distinct scroll segments
- Update scroll position calculations to use relative percentages on constrained timelines
2025-10-15 13:13:05 -04:00
Min Idzelis
146973b072
fix: re-add scroll compensation (efficiently) (#22848)
* fix: re-add scroll compensation (efficient)

* Rename showSkeleton to invisible. Adjust skeleton margins, invisible support.

* Fix faulty logic, simplify

* Calculate ratios and determine compensation strategy: height comp for above/partiality visible, month-scroll comp within a fully visible month.

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-10-14 02:16:05 +00:00
Min Idzelis
ce4e8fa6ba
feat: (perf) remove scroll compensation (#22837) 2025-10-10 15:48:29 -04:00
Pascal Sommer
6f3cb4f1bb
fix(web): Uniform random distribution during shuffle (#19902)
feat: better random distribution
2025-10-08 10:19:33 -04:00
Jason Rasmussen
76eaee3657
fix: timeline scroll error handling (#21324) 2025-08-26 17:07:26 -05:00
Jason Rasmussen
d5a01c0310
fix(web): timeline time bucket issue (#20438) 2025-07-30 11:21:02 -05:00
Jed-Giblin
9b3718120b
feat: shared links custom URL (#19999)
* feat: custom url for shared links

* feat: use a separate route and query param

---------

Co-authored-by: Jason Rasmussen <jason@rasm.me>
2025-07-28 14:16:55 -04:00
Daimolean
a36840d7cc
fix(web): multi-select in ascending asset order (#19461) 2025-07-24 22:37:44 +01:00
renovate[bot]
250548dea6
fix(deps): update typescript-projects (#19939)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
2025-07-22 17:42:07 +00:00
Zack Pollard
4c69511225
revert: "feat(web): wasm justified layout" (#19226) 2025-06-17 16:01:40 +00:00
Mert
bc062da11b
feat(web): wasm justified layout (#19150)
* wasm justified layout

* fix tests

* redundant layout generation

* raw position
2025-06-17 09:20:14 -05:00
Zack Pollard
e2dfbd66c3
ci: browser compatibility linting (#19132) 2025-06-13 10:54:59 -04:00
Min Idzelis
4b4ee5abf3
refactor: timeline manager renames (#19007)
* refactor: timeline manager renames

* refactor(web): improve timeline manager naming consistency

- Rename AddContext → GroupInsertionCache for clearer purpose
- Rename TimelineDay → DayGroup for better clarity
- Rename TimelineMonth → MonthGroup for better clarity
- Replace all "bucket" references with "monthGroup" terminology
- Update all component props, method names, and variable references
- Maintain consistent naming patterns across TypeScript and Svelte files

* refactor(web): rename buckets to months in timeline manager

- Rename TimelineManager.buckets property to months
- Update all store.buckets references to store.months
- Use 'month' shorthand for monthGroup arguments (not method names)
- Update component templates and test files for consistency
- Maintain API-related 'bucket' terminology (bucketHeight, getTimeBucket)

* refactor(web): rename assetStore to timelineManager and update types

- Rename assetStore variables to timelineManager in all .svelte files
- Update parameter names in actions.ts and asset-utils.ts functions
- Rename AssetStoreLayoutOptions to TimelineManagerLayoutOptions
- Rename AssetStoreOptions to TimelineManagerOptions
- Move assets-store.spec.ts to timeline-manager.spec.ts

* refactor(web): rename intersectingAssets to viewerAssets and fix property references

- Rename intersectingAssets to viewerAssets in DayGroup and MonthGroup classes
- Update arrow function parameters to use viewerAsset/viewAsset shorthand
- Rename topIntersectingBucket to topIntersectingMonthGroup
- Fix dateGroups references to dayGroups in asset-utils.ts and album page
- Update template loops and variable names in Svelte components

* refactor(web): rename #initializeTimeBuckets to #initializeMonthGroups and bucketDateFormatted to monthGroupTitle

* refactor(web): rename monthGroupHeight to height

* refactor(web): rename bucketCount to assetsCount, bucketsIterator to monthGroupIterator, and related properties

* refactor(web): rename count to assetCount in TimelineManager

* refactor(web): rename LiteBucket to ScrubberMonth and update scrubber variables

- Rename LiteBucket type to ScrubberMonth
- Rename bucketDateFormattted to title in ScrubberMonth type
- Rename bucketPercentY to monthGroupPercentY in scrubber component
- Rename scrubBucket to scrubberMonth and scrubBucketPercent to scrubberMonthPercent

* fix remaining refs to bucket

* reset submodule to correct commit

* reset submodule to correct commit

* refactor(web): extract TimelineManager internals into separate modules

- Move search-related functions to internal/search-support.svelte.ts
- Extract websocket event handling into WebsocketSupport class
- Move utility functions (updateObject, isMismatched) to internal/utils.svelte.ts
- Update imports in tests to use new module structure

* refactor(web): extract intersection logic from TimelineManager

- Create intersection-support.svelte.ts with updateIntersection and calculateIntersecting functions
- Remove private intersection methods from TimelineManager
- Export findMonthGroupForAsset from search-support for reuse
- Update TimelineManager to use the extracted intersection functions

* refactor(web): rename a few methods in intersecting

* refactor(web): rename a few methods in intersecting

* refactor(web): extract layout logic from TimelineManager

- Create layout-support.svelte.ts with updateGeometry and layoutMonthGroup functions
- Remove private layout methods from TimelineManager
- Update TimelineManager to use the extracted layout functions
- Remove unused UpdateGeometryOptions import

* refactor(web): extract asset operations from TimelineManager

- Create operations-support.svelte.ts with addAssetsToMonthGroups and runAssetOperation functions
- Remove private asset operation methods from TimelineManager
- Update TimelineManager to use extracted operation functions with proper AssetOrder handling
- Rename getMonthGroupIndexByAssetId to getMonthGroupByAssetId for consistency
- Move utility functions from utils.svelte.ts to internal/utils.svelte.ts
- Fix method name references in asset-grid.svelte and tests

* refactor(web): extract loading logic from TimelineManager

- Create load-support.svelte.ts with loadFromTimeBuckets function
- Extract time bucket loading, album asset handling, and error logging
- Simplify TimelineManager's loadMonthGroup method to use extracted function

* refresh timeline after archive keyboard shortcut

* remove debugger

* rename

* Review comments - remove shadowed var

* reduce indents - early return

* review comment

* refactor: simplify asset filtering in addAssets method

Replace for loop with filter operation for better readability

* fix: bad merge

* refactor(web): simplify timeline layout algorithm

- Replace rowSpaceRemaining array with direct cumulative width tracking
- Invert logic from tracking remaining space to tracking used space
- Fix spelling: cummulative to cumulative
- Rename lastRowHeight to currentRowHeight for clarity
- Remove confusing lastRow variable and simplify final height calculation
- Add explanatory comments for clarity
- Rename loop variable assetGroup to dayGroup for consistency

* simplify assetsIterator usage

* merge/lint

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-06-10 09:30:13 -05:00