Repository navigation
Fit the menu bar to the space it has instead of fixed breakpoints - #132
Merged
Merged
Conversation
The menu bar only collapsed at fixed window widths, so when the right side was wide (signed in, with a long save status) the project title shrank to an empty box and Help, the block count and the title slid under the save button. Measure the free space instead and drop the save status text, menu labels, the save label and finally the full menu, one step at a time.
Deploying scratch-gui with
|
| Latest commit: |
3d70755
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0c0a86e6.scratch-gui.pages.dev |
| Branch Preview URL: | https://fix-menu-bar-overlap.scratch-gui.pages.dev |
mc20000-01
pushed a commit
to mc20000-01/scratch-gui
that referenced
this pull request
Nov 7, 2026
Fit the menu bar to the space it has instead of fixed breakpoints
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.
Preview: https://fix-menu-bar-overlap.scratch-gui.pages.dev/editor
The menu bar only collapsed at fixed window widths: labels at 1124px and the More menu at 900px. The right side never counted toward those widths. When it was wide (signed in, with "Save to MistWarp" plus "Unsaved changes", collab, chat, files, notifications and the avatar), the project title shrank to an empty dashed box. Help, the block count and the title then slid under the save button, and their text drew on top of each other.
The menu bar now measures how much room the main menu really has, keeping at least 120px for the project title. When it runs out, it drops one thing at a time:
It goes back up a step only once the space that step saved is free again, so the bar doesn't flicker at the boundary. The old viewport breakpoints stay as a floor.
Before
At 1200px with a wide right side, the block count, "Save to your computer" and "Unsaved changes" draw over each other and the title is a dashed sliver.

After
At 1700px only the status text is dropped.

At 1300px the menu shows icons only and the save button shows its icon and status dot.

At 1200px the menu moves behind the More button and the title keeps its room.

The More menu still shows its labels.

The window narrowing from 1700px to 950px and back.

The screenshots widen the right group with
[data-mw-item="mw-editor-nav"]{min-width:300px}to match a signed-in account, since the dev server editor runs without community sign-in.Testing
test/unit/lib/mw-menu-bar-fit.test.jscovers the measurement and the step up and step down rules.