You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Third slice of #290. Once the menu bar lands (#340), it lists every command wherever you are, so you can't tell at a glance which ones do anything here. The palette and the mnemonic leader already leave out what you can't run where you are (#284, #285). The menu should keep its shape — items don't come and go, so you still learn where things live — but dim what doesn't apply. Needs #340 merged first.
Acceptance criteria
With no file open, the menus still list every item, but the ones that need an open editor (e.g. Edit › Move line up, Go › Go to line:column) are dimmed in the theme's disabled colour, and Enter or a click on them does nothing.
With focus in the Explorer, editor-only items are dimmed; with focus in an editor, they're not.
Diff › Next change, Previous change, Go to line in file and Revert change are dimmed unless a diff tab had focus when the menu opened.
Review › PR overview, Create comment and Submit review are dimmed until a pull request is loaded; the Diff and Git blame items that need a git repo are dimmed outside one.
Which items are dimmed follows where you were when you opened the menu, the same rule the palette uses, so anything the palette lists there is enabled in the menu and vice versa.
↑/↓ still walk every item including dimmed ones, so the menu reads the same everywhere.
Tests
For a few contexts (no file open, Explorer focused, editor focused, diff focused, no git repo), the enabled set of menu items equals the set of commands the palette offers there, over the real commands.
A dimmed item doesn't run its command from the keyboard or the mouse.
Menus reopened after focus moves reflect the new context.
Out of scope
Hiding items or whole menus. They dim; they don't disappear.
Changing which commands the palette or the leader offer, or any command's scope.
Context
Third slice of #290. Once the menu bar lands (#340), it lists every command wherever you are, so you can't tell at a glance which ones do anything here. The palette and the mnemonic leader already leave out what you can't run where you are (#284, #285). The menu should keep its shape — items don't come and go, so you still learn where things live — but dim what doesn't apply. Needs #340 merged first.
Acceptance criteria
Enteror a click on them does nothing.↑/↓still walk every item including dimmed ones, so the menu reads the same everywhere.Tests
Out of scope