[PB.6745] feature/Add date scroll - #575
Open
CandelR wants to merge 4 commits into
Open
Conversation
CandelR
marked this pull request as ready for review
August 28, 2026 15:05
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add a draggable date scrubber to the Photos timeline
Summary
usePhotosScrubber: new hook owning the rail: visibility and idle auto hide, year pill positions, the month label store, and the shared values that place the handle.PhotosScrubber: new component rendering the rail, the year pills and the handle. The gesture handlers are Reanimated worklets with norunOnJS, writing shared values that a singleuseAnimatedStyleresolves, so the handle tracks the finger without waiting on the JS thread. Scrolling the list and updating the month label go out throughscheduleOnRNand are free to arrive late.photoTimelineLayout: new module with the timeline geometry: item index to scroll offset and back, total content height, rail position for a scroll offset, and the year and month anchors.getRailAnchorForScrollcarries theworkletdirective so the same definition serves the animated style, the gesture and the settle reaction instead of three copies drifting apart.PhotosTimeline: wires the scrubber to the list and merges its scroll notification into the existing handler. Also hoists theFlashListconfig objects out of the render, memoizes the current boundary lookup, which was a linear scan over one entry per day running on every render, and memoizes the overlay sync status.useCloudThumbnail: fixes retry state leaking across recycled cells.retryCountbelongs to the cell, which FlashList reuses for other items, so a single failed image made every later item in that cell refetch a thumbnail it already had on disk.photoTimelineGroups:findGroupForIndexnow delegates to a sharedfindLastAtOrBeforebinary search, replacing a linear scan.