Notes: Keep tall floating threads scrollable on short content#77821
Notes: Keep tall floating threads scrollable on short content#77821
Conversation
|
Size Change: +172 B (0%) Total Size: 7.82 MB 📦 View Changed
ℹ️ View Unchanged
|
| }; | ||
|
|
||
| const handleNoteSelect = () => { | ||
| const onSelectNote = () => { |
There was a problem hiding this comment.
A single method to handle selection for the thread body or show more reply clicks.
| }; | ||
|
|
||
| const unselectNote = () => { | ||
| const onDeselectNote = () => { |
There was a problem hiding this comment.
Nit: Trying to match naming patterns.
| if ( adjacentThread.blockClientId ) { | ||
| toggleBlockSpotlight( adjacentThread.blockClientId, true ); | ||
| // Pass `null` as the second parameter to prevent focusing the block. | ||
| selectBlock( adjacentThread.blockClientId, null ); | ||
| } |
There was a problem hiding this comment.
Not fully related to this issue. Canvas syncing was missing, causing stale block selection/spotlight. This matches keyboard nav behavior.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Flaky tests detected in c728789. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25150491955
|
What?
A minor follow-up to #77433.
PR adds a cap to the floating thread height (using dynamic viewport height), allowing replies and the form to be reachable. It seems to be a common approach in other apps, and it makes sense to set a limit so the thread height doesn't exceed the viewport height.
The new
scrollNoteThreadIntoViewshould account for potential recalculations after the thread is expanded.Why?
Previously, this was handled via the canvas max-height hack, which was removed in #77433.
Testing Instructions
Testing Instructions for Keyboard
Same.
Screenshots or screencast
CleanShot.2026-04-30.at.10.17.32.mp4
Use of AI Tools
Claude for initial review and researching common patterns in other apps.