Repository navigation
fix(dots): keep the section list open while a finger rests on the dots - #14
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
🟢 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
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.
Summary
The section list closed 3 s after the last
show(), andshow()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.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.yarn test(97 passed, 2 todo),yarn typecheckandyarn lintpass, 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.
main)One frame per second from the touch (top: before, bottom: after):
Full-resolution recordings: before.mp4, after.mp4. They are on the
pr-assetsbranch, 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()inFastScrollSectionFullList.tsxand add tests at the same place. Whichever merges second needs a small rebase.🤖 Generated with Claude Code