Repository navigation
Notes: keep the block outline, remove the spotlight dimming on note selection - #80493
adamsilverstein wants to merge 4 commits into
Conversation
…ection Selecting a note dimmed every other block via a temporary Spotlight mode, which made it impossible to read the surrounding content the note may refer to. Swap the toggleBlockSpotlight dispatches for toggleBlockHighlight so the related block keeps the familiar blue List View-style outline while the rest of the canvas stays fully visible. See #72860.
|
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. |
|
Size Change: -12 B (0%) Total Size: 7.74 MB 📦 View Changed
|
|
Flaky tests detected in 14a76df. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29870047557
|
|
Tested on WordPress Playground — confirms the fix works as expected. Hovering or clicking a note shows the blue outline on its block with no spotlight/dimming on the rest of the canvas. Switching between notes correctly moves the outline, and deselecting removes it cleanly. Screen.Recording.2026-07-21.at.10.39.40.AM.mov |
|
This looks great to me! I think this is a more appropriate approach to highlighting the related context for the notes. |
|
@jasmussen what do you think? |
The existing collapse test already covers that selecting a note highlights the related block, so a separate test for the absence of the removed spotlight class adds cost without coverage.
|
cc: @fcoveram as well for feedback |
|
To note, I think Fran is AFK for another week or so for the summer. To the PR, if this is the agreed upon direction, I will trust you all. But I don't think this PR can land alone, I personally consider it blocked by us landing the full-block-highlight color that I know is in progress in a separate PR. Thanks for keeping at it! |
|
As much as I like working on atomic changes, I think there's a bigger overlap with #80493. Probably better to land those together, since they affect the same area. |
|
Related PR for reference:
So should I merge these into a single PR or a stack to keep them separately reviewable? |
|
+1 to a single PR in this case. Easier to visually review the final result. |
|
Closing in favor of the combined PR: |
What?
Stop activating the temporary Spotlight mode when a note is selected. Instead, the related block keeps the blue outline highlight (the same treatment as hovering a block in List View), and the rest of the canvas stays fully visible.
Addresses #72860.
Why?
As raised in #72860, dimming every other block when a note is selected makes it impossible to read the surrounding content, which is often exactly what a note refers to ("this paragraph should probably be moved before or combined with the previous one"). @joedolson reiterated that for accessibility the surrounding content needs to remain readable while authoring or reviewing a note.
This implements the compromise @jeffpaul suggested in the discussion: use the blue block outline (already applied when hovering notes) as the persistent visual anchor when a note is selected, rather than the Spotlight dimming. A previous PR (#79123) removed the spotlight in one code path without a replacement indicator and was closed; this PR instead swaps the spotlight for the outline highlight consistently across every path that triggered it.
How?
In the collab sidebar components (
note-thread.js,notes.js,add-note.js,index.js), everytoggleBlockSpotlightdispatch is replaced withtoggleBlockHighlight, keeping the on/off pairing at each call site intact:The private
toggleBlockSpotlightaction in the block-editor store is intentionally left in place for now so this change is easy to revert while the direction is under discussion; it can be removed in a follow-up if we settle on the outline.The existing "should collapse a note when the focus moves outside the note" e2e test already asserts that selecting a note highlights the related block, so no new test is added for the removed spotlight behavior.
Testing Instructions
npm run test:e2e -- test/e2e/specs/editor/various/block-notes.spec.jsScreenshots