Skip to content

Notes: Reset paragraph top margin in floating notes - #84101

Merged
t-hamano merged 1 commit into
trunkfrom
fix/floating-notes-paragraph-margin
Oct 6, 2026
Merged

t-hamano merged 1 commit into
trunkfrom
fix/floating-notes-paragraph-margin

Conversation

@t-hamano

@t-hamano t-hamano commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What?

Follow-up to #83786

Restores the zero top margin on paragraphs in floating note content.

Why?

#83786 moved floating notes out of the PluginSidebar into the canvas margin, so they are no longer inside .interface-complementary-area and lost its p { margin-top: 0 } rule. Note paragraphs now get the browser's default top margin, which pushes each note's text toward the next note's byline and makes the action menus look like they belong to the wrong note.

How?

Reset margin-top on paragraphs within .editor-collab-sidebar-panel__note-content.

Testing Instructions

  1. Open a post and add a note to a block.
  2. Add two replies to the note.
  3. Select the note in the floating notes on the canvas.
  4. Confirm each note's text sits directly below its own byline, with no extra space above it.
  5. Open the "All notes" sidebar and confirm the notes look the same as before.

Screenshots or screencast

Before After
image image

Use of AI Tools

Claude Code was used to investigate the cause and to write the fix and this description. I reviewed the changes.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the [Package] Editor /packages/editor label Oct 6, 2026
@t-hamano t-hamano self-assigned this Oct 6, 2026
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting labels Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +30 B (0%)

Total Size: 8.29 MB

📦 View Changed
Filename Size Change
build/styles/editor/style-rtl.css 32.5 kB +9 B (+0.03%)
build/styles/editor/style-rtl.min.css 27.7 kB +7 B (+0.03%)
build/styles/editor/style.css 32.6 kB +7 B (+0.02%)
build/styles/editor/style.min.css 27.6 kB +7 B (+0.03%)

fe584dc Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric bcf5675 trunk % Change
timeToFirstByte 40.15 ms +7.1% -2.74% 42.8 ms +2.34% -9.35% -6.19%
largestContentfulPaint 68 ms +5.88% -5.88% 74 ms +5.41% -13.51% -8.11%
lcpMinusTtfb 26.75 ms +4.11% -2.99% 27.55 ms +18.69% -6.53% -2.9%
wpBeforeTemplate 19.51 ms +8.15% -1.79% 20.49 ms +5.17% -7.61% -4.78%
wpTemplate 17.56 ms +5.81% -3.87% 18.29 ms +8.26% -7.65% -3.99%
wpTotal 37.01 ms +7.08% -2.62% 39.32 ms +3.15% -9.31% -5.87%
wpMemoryUsage 7.65 MB +0% -0% 7.61 MB +0% -0% 0.45%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric bcf5675 trunk % Change
timeToFirstByte 33.1 ms +1.96% -2.57% 33.2 ms +5.12% -4.07% -0.3%
largestContentfulPaint 72 ms +5.56% -0% 72 ms +5.56% -0% 0%
lcpMinusTtfb 39.6 ms +3.66% -1.77% 39.95 ms +2.38% -5.38% -0.88%
wpBeforeTemplate 17.01 ms +3.41% -1.12% 17.01 ms +8% -2.7% 0%
wpTemplate 12.77 ms +6.11% -1.64% 12.84 ms +7.09% -2.41% -0.55%
wpTotal 30.43 ms +2.17% -3.15% 30.16 ms +7.23% -3.25% 0.9%
wpMemoryUsage 6.27 MB +0% -0% 6.23 MB +0% -0% 0.7%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric bcf5675 trunk % Change
mediaProcessingJpeg 289.84 ms +2.37% -0.82% 289.62 ms +3.35% -0.71% 0.08%
mediaProcessingAvif 4154.06 ms +1.19% -0.62% 4179.34 ms +0.88% -0.78% -0.6%
mediaProcessingJpegToAvif 2881.17 ms +1.07% -1.97% 2839.78 ms +3.62% -0.4% 1.46%

media-upload

Metric bcf5675 trunk % Change
jpegUploadProcessing 1419.28 ms +0.97% -0.8% 1402 ms +1.11% -0.23% 1.23%
pngUploadProcessing 174.61 ms +3.91% -4.43% 173.81 ms +8.62% -6.53% 0.46%
largeJpegUploadProcessing 1392.97 ms +1.14% -0.67% 1392.79 ms +1.35% -0.31% 0.01%
multipleImageUploadProcessing 1466.4 ms +0.45% -1.05% 1462.13 ms +1.06% -1.94% 0.29%

post-editor

Metric bcf5675 trunk % Change
serverResponse 261.65 ms +5.77% -5.78% 281.93 ms +1.56% -2.73% -7.19%
firstPaint 164.04 ms +28.04% -15.69% 149.85 ms +6.6% -12.55% 9.47%
domContentLoaded 703.95 ms +1.74% -2.1% 718.75 ms +1.05% -3.55% -2.06%
loaded 704.95 ms +1.74% -2.07% 719.75 ms +1.07% -3.53% -2.06%
firstContentfulPaint 306.13 ms +2.65% -2.23% 308.85 ms +4.12% -4.46% -0.88%
firstBlock 2019.9 ms +3.35% -2.11% 2059.36 ms +1.55% -1.25% -1.92%
type 16.42 ms +6.76% -3.35% 16.36 ms +3.3% -9.96% 0.37%
typeWithoutInspector 15.25 ms +5.05% -4.2% 14.44 ms +6.58% -1.25% 5.61%
typeWithTopToolbar 17.47 ms +3.78% -3.61% 19.98 ms +7.86% -3.85% -12.56%
typeContainer 6.62 ms +4.53% -5.59% 6.89 ms +3.19% -6.39% -3.92%
focus 47.17 ms +10.01% -9.16% 47.68 ms +14.28% -2.75% -1.07%
firstFocus 148.06 ms +0% -0% 141.35 ms +0% -0% 4.75%
selectAll 328.44 ms +11.56% -5.22% 307.29 ms +24.33% -3.01% 6.88%
listViewOpen 39.54 ms +8.02% -5.31% 36.22 ms +10.16% -8.53% 9.17%
inserterOpen 16.81 ms +21.48% -6.42% 16.38 ms +22.04% -4.58% 2.63%
inserterHover 1.88 ms +9.04% -12.23% 1.9 ms +17.37% -12.11% -1.05%
inserterSearch 6.39 ms +21.28% -2.03% 6.36 ms +8.65% -3.77% 0.47%
loadPatterns 449.55 ms +4.51% -5.25% 429.66 ms +13.21% -1.26% 4.63%
wpTotal 254.24 ms +6.11% -5.87% 274.84 ms +1.55% -2.71% -7.5%
wpMemoryUsage 13.20 MB +0% -0% 13.17 MB +0% -0% 0.25%
wpDbQueries 54 +0% -0% 54 +0% -0% 0%

site-editor

Metric bcf5675 trunk % Change
serverResponse 506.54 ms +3.06% -6.03% 483.36 ms +7.52% -2.4% 4.8%
firstPaint 240.64 ms +12.6% -9.68% 206.89 ms +18.09% -6.32% 16.31%
domContentLoaded 1165.01 ms +1.86% -2.22% 1147.27 ms +1.78% -0.24% 1.55%
loaded 1166.29 ms +1.86% -2.24% 1148.51 ms +1.77% -0.24% 1.55%
firstContentfulPaint 469.73 ms +1.19% -3.14% 459.09 ms +1.24% -1.35% 2.32%
firstBlock 4176.13 ms +1.02% -0.8% 4143.67 ms +0.24% -0.27% 0.78%
type 17.59 ms +1.99% -5.29% 16.94 ms +3.25% -3.78% 3.84%
navigate 99.2 ms +14.04% -1.09% 112.27 ms +8.68% -8.14% -11.64%
loadPatterns 1404.6 ms +10.9% -7.33% 1298.3 ms +2.08% -3.24% 8.19%
loadPages 1041.17 ms +2.36% -0.4% 1053.12 ms +2.4% -1.74% -1.13%
wpTotal 496.91 ms +3.1% -6.22% 473.82 ms +7.59% -2.43% 4.87%
wpMemoryUsage 12.25 MB +0% -0% 12.21 MB +0% -0% 0.3%
wpDbQueries 43 +2.33% -0% 43 +2.33% -0% 0%

fe584dc Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

scrolls the thread before the canvas in /test/e2e/specs/editor/various/block-notes-floating.spec.js, passed after 1 failed attempt.
Error: expect(received).toBeGreaterThan(expected)

Expected: > 221
Received:   221

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/block-notes-floating.spec.js:839:6

fe584dc Run

@t-hamano
t-hamano marked this pull request as ready for review October 6, 2026 08:02

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @t-hamano!

@t-hamano
t-hamano merged commit 803a41d into trunk Oct 6, 2026
127 checks passed
@t-hamano
t-hamano deleted the fix/floating-notes-paragraph-margin branch October 6, 2026 08:42
@github-actions github-actions Bot added this to the Gutenberg 24.2 milestone Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Notes Phase 3 of the Gutenberg roadmap around block commenting [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants