-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the user to use the tab switcher with in-order tab switching #8076
Conversation
…tter than two, so I've got to get rid of a bunch of this.
…order-best-order # Conflicts: # src/cascadia/TerminalSettingsModel/GlobalAppSettings.h # src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl
All our JSON files are _actually_ JSONC files - json with comments. A well-behaved application that accepts JSON should accept and ignore comments. However, `jsonlint` is not a well behaved application in this regard. So, to prevent the linter from complaining about our JSON comments, we need to disable it entirely. THAT'S RIGHT, there's not a setting to allow JSONC. See #8076 as an example of this working. This will also unblock #7462.
doc/cascadia/profiles.schema.json
Outdated
@@ -684,8 +684,20 @@ | |||
}, | |||
"useTabSwitcher": { | |||
"default": true, | |||
"description": "When set to \"true\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI.", | |||
"type": "boolean" | |||
"description": "When set to \"true\" or \"mru\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI, with most-recently-used ordering. When set to \"inOrder\", the tab switcher will switch tabs in their current ordering. Set to \"false\" to disable the tab switcher.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took me a minute here. So the UI is used for either true, MRU, or inOrder. And false is no UI. The way it's described its sort of like "true"/"mru" = UI and MRU, "inorder" = ???? and in order, "false" = No UI. Like it's weirdly implicit that the UI is used for in order and explicit for the other two options.
Or maybe I'm just crazy.
doc/cascadia/profiles.schema.json
Outdated
@@ -684,8 +684,20 @@ | |||
}, | |||
"useTabSwitcher": { | |||
"default": true, | |||
"description": "When set to \"true\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI.", | |||
"type": "boolean" | |||
"description": "When set to \"true\" or \"mru\", the \"nextTab\" and \"prevTab\" commands will use the tab switcher UI, with most-recently-used ordering. When set to \"inOrder\", the tab switcher will switch tabs in their current ordering. Set to \"false\" to disable the tab switcher.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm is there a way we can only accept the three strings "mru", "inOrder", and "disabled"? imo that's clearer than giving the option of true/false as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's too late, we already started accepting true
and false
, and telling people to use those settings ;___;
So now they've gotta mean something sensible in the enum world as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dizzying complexity. There's a lot of moving parts here.
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@zadjii-msft did you doc this? ;P |
🎉 Handy links: |
Tab switch behavior changed on me out of nowhere. I've been using terminal for almost an year and this whole time tab switch was always in order, and that's how I like it. All of a sudden it changed to mru. May I suggest, next time a change like that is made, that the previous default behavior remains the default for old installations? |
Summary of the Pull Request
Changes the way the
useTabSwitcher
setting works. It now accepts either a boolean or a string:true
,"mru"
: Use the tab switcher with MRU tab switching"inOrder"
: Use the tab switcher, with in-order tab switchingfalse
,"disabled"
: Don't use the tab switcher. Tabs will switch in-order.This is following the discussion chronicled in #8025, as well as the follow-up investigation in that thread.
References
PR Checklist
Validation Steps Performed
I've been switching tabs all day and all night, with different settings values, and hot-reloading the setting.
I also ran the test I added.