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.
Pull Request Description
This PR adds some additional logic that attempts to take into account the user's currently visible comments, and perform comment navigation based on the visible contents. I also increased the animation duration since it felt a bit too quick in the previous implementation!
When the user has partially navigated down, tapping on the next comment will bring them to the next comment. Likewise, tapping on the previous comment will bring the user up to the current comment (if it is partially obscured). If the current comment is not partially obscured, it will bring the user to the previous comment.
Navigating down:
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-14.at.20.46.01.mp4
Navigating up:
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-14.at.21.03.35.mp4
Note: There is currently an issue where if you tap the up comment nav while you're in a partially obscure comment, and repeat the action with the same comment, it goes up twice. Here's a video showing the issue:
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-05-14.at.21.19.04.mp4
I haven't found an easy way to fix this yet, so if you have any ideas, please let me know!
Issue Being Fixed
Issue Number: N/A
Screenshots / Recordings
Checklist
semanticLabel
s where applicable for accessibility?