-
-
Notifications
You must be signed in to change notification settings - Fork 503
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
Feature: Add shortcut to enable Rearrange View #3035
base: dev
Are you sure you want to change the base?
Feature: Add shortcut to enable Rearrange View #3035
Conversation
Hi! Could this be updated into version 5 instead of 4? Since it's already taken...😅 |
Done. Was familiarizing myself with the codebase and forgot to move this to a separate version clause. |
I was wondering if it should also close the rearange view if it's enabled? |
As far as I could understand at the moment the only way to toggle rearrange view on is with the button inside split view menu: desktop/src/browser/base/content/zen-popupset.inc.xhtml Lines 43 to 46 in 12aa51c
And disabling it by pressing ESC: desktop/src/browser/base/zen-components/ZenViewSplitter.mjs Lines 244 to 251 in 12aa51c
Since my intention was to add a key shortcut for enabling the rearrange view without the need to click 3 times, I'm just using functions already present and just skipping a popup. If the rearrange view was already toggled on through regular means, shortcut won't do anything because there's already a check for that: desktop/src/browser/base/zen-components/ZenViewSplitter.mjs Lines 220 to 222 in 12aa51c
With all that in mind, I can't quite get the intention of your suggestion and what's needed of me. |
Read the comments about adding a new shortcut, hope this is how it should be done.
Added some checks for opened split view menu and that split view is enabled.
I don't know how to properly add the name for the shortcut in the menu and translations for it, since they seem to be in a separate repo.
Additionally while testing I needed to create a new profile for new shortcut to show up, is this intended behavior? Or do I need to remove some cached files for changes to apply?
There are also a typos:
afterRearangeAction
->afterRearrangeAction
this._thumnailCanvas
->this._thumbnailCanvas
Not sure if it's suitable to add here too.
Lastly, I had to disable Prettier for the project because applying the default prettier config from the repo messed up some files I opened, at least
ZenViewSplitter.mjs
has some inconsistencies(e.g._swapField
function has some strange whitespaces)