Skip to content

fix(dots): keep the section list open while a finger rests on the dots - #14

Merged
gfrancischini merged 1 commit into
mainfrom
fix/section-list-stays-open-while-touching
Nov 9, 2026
Merged

gfrancischini merged 1 commit into
mainfrom
fix/section-list-stays-open-while-touching

Conversation

@gfrancischini

@gfrancischini gfrancischini commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

The section list closed 3 s after the last show(), and show() only runs while the finger moves on the dots. A finger held still on the dots for 3 s closed the list in the middle of the touch, and with it the lock that keeps the dots on screen.

 FastScrollSectionDotsBar (pan)
   onBegin
+    runOnJS(onFingerDown)()
     followFinger
   onFinalize
     runOnJS(onThumbPositionChange)
+    runOnJS(onFingerUp)()

 FastScrollSectionDots
+  onFingerDown -> sectionList.hold(true)
+  onFingerUp   -> sectionList.hold(false)

 FastScrollSectionFullList
+  hold(true)   clear the 3 s hide timer; show() and scrolls do not restart it
+  hold(false)  start the 3 s hide timer

The two new callbacks are read through refs, like the existing ones, so the pan gesture is still built once.

The backlog item is removed from docs/backlog.md. The note in "Dragging the dots does work on every frame" that pointed to it now says the hold already covers the drag.

Evidence

Unit tests. One new test. It fails on main (the list is gone after 3 s) and passes with the fix.

touch a dot, move to Vegetables, hold 10 s   -> list still open                 (main: closed after 3 s)
lift                                         -> list open 2999 ms, closed at 3 s, dots hidden 1 s later

yarn test (97 passed, 2 todo), yarn typecheck and yarn lint pass, including the test that the pan callbacks stay the same objects across renders.

On a device. Android emulator (API 36), example app, categories screen. Steps: touch the dots, move two dots down, hold the finger still for 5 s, lift.

  • Before: the list closes about 3 s into the hold while the finger is still down, then opens again when the finger lifts.
  • After: the list stays open for the whole hold and closes 3 s after the finger lifts.
Before (main) After (this branch)
The list slides out while the finger (grey marker on the dots) is still down, and opens again on lift. The list stays open for the whole hold and closes 3 s after the lift.

One frame per second from the touch (top: before, bottom: after):

Full-resolution recordings: before.mp4, after.mp4. They are on the pr-assets branch, which only holds PR media and is not meant to be merged.

The after clip was recorded on this branch alone, without the centering fix (#13), so the list still opens at its top there.

Merge Danger

Door: two-way

Internal callbacks only; the public props and handle are unchanged.

Blast Radius: section list timing

Only the time the section list stays open changes, and only while a finger is on the dots.

This PR and "center the active section when the section list opens" both change show() in FastScrollSectionFullList.tsx and add tests at the same place. Whichever merges second needs a small rebase.

🤖 Generated with Claude Code

The section list closed 3 s after the last show(), and show() only runs
while the finger moves on the dots. A finger held still on the dots for
3 s closed the list, and with it the lock that keeps the dots on screen,
in the middle of the touch.

The dots bar now reports when a finger touches it and when it lifts, and
the section list holds its hide timer in between. Once the finger lifts,
the list closes 3 s later as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gfrancischini added a commit that referenced this pull request Nov 9, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gfrancischini
gfrancischini requested a balanced review from Copilot November 9, 2026 19:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for this change.

No open issues 🎉

What changed in this PR

Keeps the section list and dots visible while a finger rests on the dots, preventing the hide timer from closing them mid-touch. Public props and handles remain unchanged.

Changes:

  • Connects finger-down and finger-up callbacks to an internal hold mechanism, restarting the three-second hide timer on release.
  • Adds a regression test covering a prolonged hold and delayed hiding after release.
  • Removes the resolved backlog item and updates the related performance note.
File Description
src/​FastScrollSectionDots/​FastScrollSectionFullList.tsx Adds hold state to suspend hiding until release.
src/​FastScrollSectionDots/​FastScrollSectionDotsBar.tsx Adds stable callbacks for gesture begin and finalize.
src/​FastScrollSectionDots/​FastScrollSectionDots.tsx Connects gesture callbacks to the section list’s hold mechanism.
src/​FastScrollSectionDots/​__tests__/​FastScrollSectionDots.test.tsx Tests visibility during a hold and hide timing after release.
docs/​backlog.md Removes the fixed issue and updates the drag-performance note.

Review effort: Balanced

@gfrancischini
gfrancischini merged commit 7de498f into main Nov 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants