Adds shortcuts for better navigating editor window#2979
Adds shortcuts for better navigating editor window#2979vadi2 merged 26 commits intoMudlet:developmentfrom
Conversation
… to pane in the trigger editor.
… right. Just missing reverse shortcut and logic.
|
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
|
CTRL+Tab and CTRL+SHIFT+Tab are widely used to jump from one panel to another, and are mentioned for this purpose in the Qt Documentation as well as in Microsoft UI Design Guides. I tried to select a reasonable tabbing order that brings you quickly through the window to the most used options, with some things needing a combination of this shortcut and normal tab. There are some cases where it might be worth considering adding further stops along the way, like adding a position at the Stylesheet editor for Buttons. |
* WIP * Const the variables that we can * Format
* Move declaration of install functions This allows us to use them singularly in a different context.
Intention is to send all improvements upstream but not be delayed by them getting merged.
…ces (Mudlet#2953) * Don't show SSL certificate info until we have one & streamline UI * Remove colorroles
…dlet#2945) * Add a workaround for mapper creation breaking getMainWindowSize() * Revert "Fix errors when creating new triggers (Mudlet#2868)" This reverts commit 0578c61. * Fix typo
* Raise minimum to Qt 5.11 * Update Travis minimum Qt build
* Replace a couple of cases of std::tie with auto * A few more
* Update tooltip, more than IRE now provide maps (Mudlet#2668) * Add autocomplete toggle to profile * Update to a version of edbee with autocomplete toggle * Wire in the autocomplete toggle * Use correct host variable * Add missing toggle call
vadi2
left a comment
There was a problem hiding this comment.
Seems to work fine for me, the only concern is that it's a custom shortcut that nobody will know about - need to make it discoverable somehow.
What do you think about the CodeFactor warning?
Well, 1/4 of the issues found is unrelated to mode changes entirely. The other three just say "complex method". I'm not really sure there's much more that I could do to make it better though. |
src/dlgTriggerEditor.cpp
Outdated
| { | ||
| switch (mCurrentView) { | ||
| case EditorViewType::cmTriggerView: | ||
| if (QString("edbee::TextEditorComponent").compare(QApplication::focusWidget()->metaObject()->className()) == 0) { |
There was a problem hiding this comment.
Fixing in commit.
Didn't fix in both functions, so I'll get another commit in.
| return; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Done in commit.
Edit: Didn't run the function on both functions(next AND previous), so I'll do that and commit again.
|
This is why I like to use my PR's as my daily driver for a while. Turns out if the first trigger pattern you have is a prompt pattern, Ctrl+Tab doesn't do anything if you're in the name field(or the other fields that Ctrl+Tab to the patterns). I'll have to set up some logic to find the first not-prompt pattern field, or to go to the first pattern's drop-down type list instead. |
|
Also, @vadi2, I share your concern that very few people aside from those that read the updatelog will actually know the shortcut exists, but I'm not entirely sure how we could increase its visibility. We could possibly put them into the "you haven't selected a trigger yet" screen, but I'm not sure that many people read that. |
|
One thought is those 'New! Now you can do this' context-sensitive bubbles, but we don't have the framework to setup to them. The next best alternative would be tooltip(s) - don't have it much clearer than that tho. @Mudlet/ui-review ? |
vadi2
left a comment
There was a problem hiding this comment.
🤷♂️ no feedback from there, so let's go with it as-is and add the ideas on discoverability in a later update.
For one https://wiki.mudlet.org/w/Manual:Editor will need to be updated, but I don't remember the website I made it with.
I updated that image to be a text instead for a11y reasons.
The word "section" I am not too happy with, maybe "widget" (but technical), maybe "panel" (as named above), maybe other still? Also I would have naively assumed CTRL + Tab to bring me from trigger editor to alias editor to timer editor, etc. Is that another shortcut still? |
|
Thanks for changing it! Much easier to update now, too. I think "section" sounds fine, but if someone has a better term, I wouldn't mind. Taking you to another editor I don't think was the purpose of this shortcut. It should indeed be a different shortcut. |


Brief overview of PR changes/additions
Adds CTRL+Tab and CTRL+SHIFT+Tab shortcuts that enable you to jump from section to section in
the editor window without needing to use your mouse.
Motivation for adding to Mudlet
I personally hate having to use the mouse pretty much ever. When I'm working on coding and the like, I like to be able to navigate with both hands on the keyboard. This change further enables that. Additionally, this will benefit any Visually Impaired users, by reducing the guess-work with tabbing repeatedly, and making it possible to escape the Edbee editor without needing to use a mouse.
Other info (issues closed, discussion etc)