Repository navigation
Keep the markup toolbar from setting its editor's width - #1503
Merged
Merged
Conversation
A tutorial bubble sizes itself to its content, and the markup toolbar is a no-wrap row of buttons, so the toolbar's 878px of buttons stretched the bubble past its 320px column. OverflowToolbar then measured that stretched width as room to spare and settled at ~505px, so text ran on one line and the part past the column edge was cut off, along with the save status beside it. Wrapping the toolbar in `contain: inline-size` makes it take the editor's width, so it folds buttons into its menu as designed. Scoped to the markup editor: the other seven OverflowToolbar users may sit in content-sized boxes, where containment would collapse them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Context
While reviewing #1502, I noticed that editing a tutorial bubble in localization mode opened an editor wider than the tutorial's dialog column, at every window width. The text ran on one line, and the part past the column edge was cut off, along with the new save status beside it.
Cause, measured in the browser:
OverflowToolbardecides how many buttons fit from its container'sclientWidth. It measured that stretched width as room to spare and folded just enough buttons into ☰ to settle at about 505px. That state holds itself up.The text itself was only 247px wide. It sat on one line only because the editor had been stretched.
What changed
MarkupToolbarwraps itsOverflowToolbarin adivwithcontain: inline-size. The toolbar now takes the editor's width instead of setting it, and folds buttons into ☰ as designed.This is scoped to the markup editor on purpose. The other seven
OverflowToolbarusers (Page, ProjectView, ProjectFooter, the code editor's Toolbar, GlyphInserter, InsertToolbar and the character page) may sit in content-sized boxes, where containment would collapse them. The fix covers every host of the markup editor: tutorial bubbles, inline docs, the chat composer, how-to forms and the localization workspace.After the fix, the editor is 214px inside a 302px bubble, the text wraps, and ✓, ✕ and ☰ are all visible.
Verification
localize-annotations.spec.ts: it opens a tutorial bubble's editor in localization mode and asserts that the editor stays inside the dialog column and that ☰ shows. It failed before the fix (the editor's edge was at 600px, the column's at 329px) and passes after.npm run check:now,npm run test:run,npm run rtlandnpm run tokenspass.Checklist
🤖 Generated with Claude Code