Repository navigation
fix(desktop): ⌘1–9 switch side-panel tabs inside the side panel - #57301
Draft
kitlangton wants to merge 1 commit into
Draft
kitlangton wants to merge 1 commit into
kitlangton wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Kit asked for the browser-style shortcuts to follow focus into the side panel: ⌘T (#57156) and ⌘⇧T (#57269) did; ⌘1–9 didn't.
Now, while focus is in the side panel, ⌘1–8 select side-panel tab N and ⌘9 the last one, as in Chrome. Outside the panel, ⌘1–9 switch session tabs as before.
sideTabNumbers()inclosed-tabs.tsbuilds nine hidden, untitled commands (file.tab.1–file.tab.9) scoped with the samecreateSideFocus()predicate as ⌘⇧T, so they stay out of Settings › Shortcuts and win over the sessiontab.Nbinds only inside the panel. Keys match by typed character, so Dvorak is unaffected.selectSideTab), and are only registered while the side panel is open.Stacked on #57269 (now merged); rebased onto
beta.Test: a component story — ⌘1 forwarded from a focused page after clicking outside selects side tab 1, ⌘2/⌘9 inside the panel select tab 2/the last, and ⌘2 outside still switches the session tab.