Repository navigation
Keep the costume, sound and sprite right-click menu on top of the editor - #221
Merged
Merged
Conversation
The list's fade mask clipped the menu at the column edge, so its items were cut off behind the paint editor. The menu now renders on the page body, like the monitor menus, and the addon context menu API finds it there to add its items.
The menu used to inherit its text colour from the item, which it no longer sits inside, so it set black text on the midnight theme's black menu.
Deploying scratch-gui with
|
| Latest commit: |
6a0ab36
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8c61cc63.scratch-gui.pages.dev |
| Branch Preview URL: | https://fix-costume-context-menu-cli.scratch-gui.pages.dev |
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.
Right-clicking a costume showed a menu cut off at the edge of the list column, so its items were hidden behind the paint editor. The same happened to sounds and sprites, and on phones the menu was cut down to one item.
The cause was the fade mask that #218 added to the list (
mask-imageon.list-area). A mask clips everything inside the element, including theposition: fixedmenu.document.bodythrough a portal, like the monitor menus already do.src/addons/contextmenu.js) finds the menu there by its trigger id, so addon items such as "create folder" still appear..context-menunow sets its own text colour anduser-select: none. The menu used to inherit them from the item, so without this it showed black text on the midnight theme's black menu.createPortalin the snapshot test.Version: 3.5.0 -> 3.5.1 (patch).
Checked in Chromium and Firefox at desktop and phone sizes, in the light and midnight themes. Duplicate still works from the menu and the addon items still show. lint, typecheck, conventions, i18n, community css, deps, all unit tests (4052 passed), build:deploy and validate-deploy pass locally.
Screenshots
Before, desktop: the menu is cut off at the list edge.

After, Chromium:

After, Firefox:

After, midnight theme:

Before, phone: only one item shows.

After, phone:

Preview (Cloudflare Pages): https://fix-costume-context-menu-cli.scratch-gui.pages.dev/editor