Skip to content
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

[outline] 'format document' and 'toggle outline view' have a keybinding collision #6423

Closed
vince-fugnitto opened this issue Oct 21, 2019 · 15 comments · Fixed by #7694
Closed
Assignees
Labels
help wanted issues meant to be picked up, require help keybindings issues related to keybindings OS/Linux issues related to the Linux OS outline issues related to the outline

Comments

@vince-fugnitto
Copy link
Member

Description

As a user, I cannot use the keybinding for the command format document as it is being used to toggle outline view. The workaround is to use the context menu, but I do not believe it gives a proper user experience.

How to test

  • Open a file (ex: cpp-keybindings.ts)
  • Attempt to use the keybinding to format the document (ctrl+shift+i)
  • Notice the Outline View is toggled instead

Additional Information

  • OS: Linux Ubuntu 16.04
  • Theia: f255f5a
@vince-fugnitto vince-fugnitto added outline issues related to the outline keybindings issues related to keybindings OS/Linux issues related to the Linux OS labels Oct 21, 2019
@llebout
Copy link

llebout commented Apr 19, 2020

I can confirm this is an annoying issue
Also, CTRL + Shift + I is used by Chromium to open the dev tools.

@akosyakov
Copy link
Member

What would be the better keybinding to toggle the outline on Linux?

@akosyakov akosyakov added the help wanted issues meant to be picked up, require help label Apr 20, 2020
@llebout
Copy link

llebout commented Apr 20, 2020

@akosyakov I think the main problem is that Chromium (for example) handles some shortcuts before the web page can. To solve this, you can make Theia installable as a Progressive Web App and then this shortcut story is much more similar to Electron but without Electron and all it's bloat and unportability (isnt trivial to patch for IBM POWER machines even though I've done it for some versions).

My workstation is a RaptorCS Talos II, with IBM POWER CPU.

Once that is done, use exactly the same keyboard shortcuts as VS Code and it will be perfect!

@akosyakov
Copy link
Member

To solve this, you can make Theia installable as a Progressive Web App and then this shortcut story is much more similar to Electron but without Electron and all it's bloat and unportability (isnt trivial to patch for IBM POWER machines even though I've done it for some versions).

That's another issue. But since you mentioned do you have a reference link confirming it. I had it before but never had time to double check whether PWA actually handles keybindings differently or could find any confirmation.

@llebout
Copy link

llebout commented Apr 20, 2020

@akosyakov Can't find any reference but I read it at several places over the web. I'll give it a few tests with Chromium and Epiphany (GNOME WebKit based browser) which both support installing PWA.

My muscle memory is on Ctrl + Shift + I so I kind of want to keep that 😋

But I wish Chromium did support disabling some keyboard shortcuts.

Otherwise I'll have to study better defaults because that's always tricky since if you change one shortcut you most certainly have to change lots of them since they are almost all taken. I personally don't need a shortcut for the outline view which I almost never use.

@akosyakov
Copy link
Member

But I wish Chromium did support disabling some keyboard shortcuts.

We all wish, like Ctrl+W. And Chrome does support it for dedicated windows like pop ups. I wonder whether PWA counts like a pop up window, but there are other issues then 😬

@sunix
Copy link
Contributor

sunix commented Apr 28, 2020

hey could we disable shortcuts for outline? this not frequently used, and user would just click on the sidebar to toggle. WDYT?

@vince-fugnitto
Copy link
Member Author

hey could we disable shortcuts for outline? this not frequently used, and user would just click on the sidebar to toggle. WDYT?

I don't think disabling a keybinding for a view would be a viable way forward, we should instead find a keybinding that can be used with the proper when context.

@sunix
Copy link
Contributor

sunix commented Apr 29, 2020

Hello @vince-fugnitto :)

I don't think any user would ever have to use a short-cut for a particular view. Maybe shortcuts for navigating from one view to another, toogle the editor fullscreen, or switching through predefined layouts, etc ... having a shortcut for all the specific view is definitely not a viable way forward.

Can you elaborate your meaning of "viable way forward" ?

@akosyakov
Copy link
Member

@vince-fugnitto removing the outline keybinding sounds better than what is happening right now or at least till someone proposes another solution or shortcut. Not working format document kebinding is quite bad.

@akosyakov
Copy link
Member

There are also already a way to open the outline with keyboard: F1 -> type Outline -> Enter

We could also consider to add a keybinding for Open View... instead, so one can open any view with keyboard.

@vince-fugnitto
Copy link
Member Author

@sunix

Hello @vince-fugnitto :)

I don't think any user would ever have to use a short-cut for a particular view. Maybe shortcuts for navigating from one view to another, toogle the editor fullscreen, or switching through predefined layouts, etc ... having a shortcut for all the specific view is definitely not a viable way forward.

I disagree, views should be keyboard operable, just like in other major IDE products.
At least for those contributed by the framework itself, it should be possible to open views by keyboard shortcuts similarly to vscode.

Can you elaborate your meaning of "viable way forward" ?

I mean that removing a keyboard shortcut for a view does not look like the best solution, we are choosing to fix a problem of loss of functionality (inability to run the command 'format document' by a keyboard shortcut) by removing functionality in another area. We should instead find a solution which fixes both, meaning finding a keybinding that can work in both cases.

@vince-fugnitto
Copy link
Member Author

@vince-fugnitto removing the outline keybinding sounds better than what is happening right now or at least till someone proposes another solution or shortcut. Not working format document kebinding is quite bad.

If it's the worse of the two then we can opt to removing the keybinding for now so users can have the ability to format document. It's true that we have the open view... command, but I also feel like the best solution would be to find a keyboard shortcut that works for both cases.

@akosyakov
Copy link
Member

ok, could someone send a PR removing the keybinding for the outline on Linux for now?

@vince-fugnitto
Copy link
Member Author

ok, could someone send a PR removing the keybinding for the outline on Linux for now?

Sure, I can take care of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help keybindings issues related to keybindings OS/Linux issues related to the Linux OS outline issues related to the outline
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants