This is an extension to #36224, which introduced the ability for each window to have an independent state whether its vertical tab is expanded. However, this causes the custom keyboard shortcut "Toggle Vertical Tabs Expanded" to have no visible effect at all when this per-window state is enabled.
Instead, this shortcut toggles the global expanded state across all windows (which is the default behavior for the expansion/collapse of vertical tabs for Brave). I know this because if I enable per-window expansion, invoke this keyboard shortcut once, then disable per-window expansion, the vertical tab menu is left at a state opposite from before performing this sequence of steps (so if the tabs were expanded before, then it would be collapsed after, and vice versa). Invoking this shortcut twice, however, results in the state being the same.
Steps to reproduce
Enable vertical tabs (Appearance -> Use Vertical Tabs)
Enable independent vertical tabs expand state per window (check "Expand vertical tabs independently per window")
Assign a keybind to the "Toggle Vertical Tabs Expanded" option
Try invoking the keybind
Actual result
Nothing happens visibly, however, you can observe the state of the global vertical tab has changed once you disable independent vertical tab expand state.
Expected result
The state of the window-independent vertical tab menu toggle from expanded to collapsed, or vice versa.
I attempted to fix this on my own, however, I did not have enough disk storage to npm run init the brave-core repository on my machine 😅. However, I believe that this function is close to the root of this problem: https://github.com/brave/brave-core/blob/e9b85bbcaf46c9111f0712cd920f53516107b8fe/browser/ui/browser_commands.cc#L326. We can have a separate block of logic that's run if independent expanded tab state is enabled. An alternative would be to refactor brave_tabs::kVerticalTabsCollapsed to respect the window-independent states when the option is enabled.
Now that release has caught up to 1.70, it now has the new "Expand Vertical Tabs Independently per Window" feature, and it also faces the same issue as beta as nightly channels.
Description
This is an extension to #36224, which introduced the ability for each window to have an independent state whether its vertical tab is expanded. However, this causes the custom keyboard shortcut "Toggle Vertical Tabs Expanded" to have no visible effect at all when this per-window state is enabled.
Instead, this shortcut toggles the global expanded state across all windows (which is the default behavior for the expansion/collapse of vertical tabs for Brave). I know this because if I enable per-window expansion, invoke this keyboard shortcut once, then disable per-window expansion, the vertical tab menu is left at a state opposite from before performing this sequence of steps (so if the tabs were expanded before, then it would be collapsed after, and vice versa). Invoking this shortcut twice, however, results in the state being the same.
Steps to reproduce
Actual result
Nothing happens visibly, however, you can observe the state of the global vertical tab has changed once you disable independent vertical tab expand state.
Expected result
The state of the window-independent vertical tab menu toggle from expanded to collapsed, or vice versa.
Reproduces how often
Easily reproduced
Brave version (brave://version info)
Channel information
Reproducibility
Miscellaneous information
I attempted to fix this on my own, however, I did not have enough disk storage to
npm run init
thebrave-core
repository on my machine 😅. However, I believe that this function is close to the root of this problem: https://github.com/brave/brave-core/blob/e9b85bbcaf46c9111f0712cd920f53516107b8fe/browser/ui/browser_commands.cc#L326. We can have a separate block of logic that's run if independent expanded tab state is enabled. An alternative would be to refactorbrave_tabs::kVerticalTabsCollapsed
to respect the window-independent states when the option is enabled.