Notes: Compute note positions centrally in useFloatingBoard#77433
Notes: Compute note positions centrally in useFloatingBoard#77433
Conversation
|
Size Change: -6.61 kB (-0.09%) Total Size: 7.74 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in e6f0dbc. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24706118999
|
11ed1b0 to
de455eb
Compare
|
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. |
|
Thanks, @t-hamano! I'll have a look later today, I think both issues should be fixable. |
de455eb to
4c21db0
Compare
|
@t-hamano, I think I managed to fix both problems. Plus, during iterations, Cloud and I found an interesting solution, which requires fewer hacks. |
4c21db0 to
5e78743
Compare
5e78743 to
e976584
Compare
t-hamano
left a comment
There was a problem hiding this comment.
LGTM! Works as expected 👍

What?
Closes #73653.
Partially solves #73565.
Replaces the floating-UI
autoUpdatedependency with a CSS-driven scroll-sync approach. Note positions are computed once in canvas content-space; a single CSS custom property (--canvas-scroll) on the sidebar panel drives the visual sync on every scroll event.@floating-ui/domfrom@wordpress/editordependencies.canvasMinHeighteditor state (action, selector, reducer). The canvas no longer grows to fit the sidebar.blockRect.top + scrollTop(the block's absolute y within the editor's scroll content).-canvas.scrollTopinto--canvas-scrollon the panel. CSS inherits the variable and each floating thread appliestransform: translateY(var(--canvas-scroll))..is-root-containerso nested-block scroll containers (e.g. a Group withoverflow: auto) don't shadow the editor canvas.Why?
Testing Instructions
Stress test floating notes.
Testing Instructions for Keyboard
Same.
Use of AI Tools
Used Claude to brainstorm my ideas, tested and reviewed personally.