Skip to content

[PB.6745] feature/Add date scroll - #575

Open
CandelR wants to merge 4 commits into
masterfrom
feature/PB-6745-add-date-scroll
Open

[PB.6745] feature/Add date scroll#575
CandelR wants to merge 4 commits into
masterfrom
feature/PB-6745-add-date-scroll

Conversation

@CandelR

@CandelR CandelR commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

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 no runOnJS, writing shared values that a single useAnimatedStyle resolves, so the handle tracks the finger without waiting on the JS thread. Scrolling the list and updating the month label go out through scheduleOnRN and 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. getRailAnchorForScroll carries the worklet directive 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 the FlashList config 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. retryCount belongs 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: findGroupForIndex now delegates to a shared findLastAtOrBefore binary search, replacing a linear scan.

@CandelR CandelR self-assigned this Aug 28, 2026
@CandelR CandelR added the enhancement New feature or request label Aug 28, 2026
@CandelR
CandelR marked this pull request as ready for review August 28, 2026 15:05
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant