Repository navigation
Conversation
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.
What does this PR do?
Closes #311
Toggle entries in menus showed no on or off state: they were plain
menuitems. They now show and announce it:MenuEntries.svelterenders the three kinds, andcontext-menu.sveltenow usesMenuEntries(submenus included) instead of its own copy. The check slot is always reserved, so labels don't shift. The icon isaria-hidden; the state is inaria-checked.MenuItemSchemagets an optionalcheckedwhen clause.resolveMenuevaluates it, andconfig.<setting key>reads a setting, so a plugin's toggle shows its state before the plugin activates. A clause that fails leaves the entry unchecked and warns once, instead of breaking the menu.themeKindcontext key. The command title "Toggle light/dark theme" is unchanged, so the palette still finds it.showHiddensetting, also before the Files panel loads. The command has anonCommand:activation.docs/docs/plugins/manifest.mdx(thecheckedfield,themeKind,config.<setting key>),docs/docs/editor/layout.mdx(View › Dark theme), and the Menus rule inAGENTS.md.How do you test this PR?
e2e/menu-toggle.spec.tsfails: nomenuitemcheckboxnamed "Dark theme".resolve-menu.spec.tsfails with theresolveMenuchange reverted (entries have nochecked).menu-toggle.spec.tschecks "Dark theme" isaria-checked="true"(the suite runs on the dark theme) and "Show hidden files" starts atfalse, toggles it by click and from the keyboard (Space), reopens the menu, and restores the setting in afinally.kit.svelte.spec.ts: checkbox and radio entries, with ArrowDown and Space on a radio entry.packages/uiunit tests 120 passed;menu-toggle.spec.ts2 passed;console.spec.ts --repeat-each 15 --retries 030 passed, 0 failed (the 30 skipped are its two "with the engine" tests);viewport.spec.tswith the engine and CLI 5 passed, 0 skipped, which runs the Resolution radio;pnpm build,pnpm lint,pnpm typecheckpass.packages/kernel(120 passed),packages/sdk(3 passed, API snapshot unchanged) andplugins/file-manager(25 passed) unit tests. After round 1 (the radio entries), 34 e2e tests passed.Merge danger
checkedandradiofields are additive; the role change is easy to revert.MenuandContextMenuconsumer that setschecked, including third-party plugins through the SDK kit. Their entries change role frommenuitemtomenuitemcheckbox(ormenuitemradiowithradio: true). Two View entries are renamed ("Dark theme", "Show hidden files"). No runtime dependents in other repos. The editor app deploys on merge (ADR 0006).menuitemcheckboxand one-of-N entriesmenuitemradio; fix/menubar-arrows (Arrow keys do not move between the top menus #319) makes the top-menu titlesmenuitemin a Menubar. The other sweep branches' specs use locators that work with or without those changes (.or(),[aria-label="Main menu"] [aria-haspopup="menu"]).apps/editor/e2e/viewport.spec.tsconflicts with fix/plugins-a11y (Small accessibility issues in the code tabs, Game screen, Packages, Problems and History #324) on adjacent lines: combine them.context-menu.sveltemerges clean with fix/workbench-a11y.pnpm build, lint, typecheck,pnpm test --force(1014 passed, 1 skipped) and the full e2e suite with the engine (141/141, Chromium only).Follow-up issues
Quality gate
docs/docs/plugins/manifest.mdx,docs/docs/editor/layout.mdx,AGENTS.md, written by the producersettings-ui.spec.ts), I1 (hidden files state unset before the plugin loads), fixed in 13db88b–672c6b9. Re-review: no Blocking or Important. Minors (radio Space test, warn once, e2e cleanup) fixed in 5e9b956: producer tests, not re-reviewedparseWhenper toggle on menu open. No separate performance reviewcheckedis one-way into bits-ui (the menu closes on select), Space untested (tested since 4c4021f)checkedonly goes through thewhenparser, noeval. No separate security review