fix: center tutorial modal and add backdrop #4893
Open
+89
−41
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.
Issue
Fixes #4890
Problem
The introductory "Meet Mr. Mouse!" tutorial modal was left-aligned and visually blended with the workspace. This made it feel like part of the main canvas instead of a focused onboarding dialog, reducing its effectiveness for new users.
Approach & Solution
Alignment Fix
sendToCenter) which set inlinetop/leftstyles and could result in misaligned positioning on different screen sizes.dist/css/windows.cssusing:position: fixedtop: 50%left: 50%transform: translate(-50%, -50%)js/widgets/help.js, after the help window is created, inlineleft,top, andtransformstyles on the widget frame are cleared so the CSS rules can take precedence.Visual Hierarchy (Backdrop)
.help-modal-backdropclass indist/css/windows.cssthat renders a full-screen, semi-transparent black overlay (rgba(0, 0, 0, 0.5)).HelpWidgetconstructor:help-modalclass to the widget frame so it appears above the backdrop.help-modalclass.z-index: 9998z-index: 9999Files Changed
dist/css/windows.css.help-modal-backdropstyles..help-modalwindow using fixed positioning and transform.js/widgets/help.jshelp-modalclass on widget frame.Testing
npm run devand tested athttp://localhost:3000