-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Palettes: Implement Type-Ahead Find with incremental search #5829
Conversation
I know I can find out if I build this, but, what happens if I type "Treble" - do I get a treble clef, or does the "T" get "eaten" by the code jumpng to the time signature palette? Also, I assume this code is only active when not in the search box, so regular search behavior isn't affected? |
If you are on the palettes then it will take you to a palette. If you are within a palette then it will take you to an item within that palette. In other words, you cannot type "treble" and expect to get a treble clef unless you are already in the clefs palette. This is slightly different to how type-ahead find usually works in a tree view. Normally you are able to jump to other levels of the tree, but only if they have previously been expanded (i.e. you can jump to any item that is currently visible). I'm not sure how useful that behaviour is, especially given that we already have search to take you straight to an item. See the template chooser in the New Score Wizard for an example of the conventional behaviour. Make sure the template tree has focus and not the searchbox.
Correct. |
@shoogle have you had a chance to test this PR on macOS and Windows? Focus doesn't work for me on macOS as you explained in the description of this PR. Typing "L" doesn't make "Lines" palette focused. |
@anatoly-os, I've only tested on Windows so far and it worked there. I will try on Linux and macOS. |
6d147ce
to
5fc83ae
Compare
If the user presses a letter key while in the Palettes tree then a matching palette or cell gains focus. E.g. Press 'L' to jump to the Lines palette. Pressing multiple keys in quick succession enables incremental search. E.g. Press 'A' shortly followed by 'R' to skip Accidentals and go straight to Articulations. Pressing the same key repeatedly cycles through matching items. E.g. 'T' => Time Signatures, 'T' => Text, 'T' => Tempo, 'T' => Time Signatures, etc.
Fixes a bug where pressing certain keys in the Palettes would trigger application shortcuts defined in Preferences. For example, the user might press 'R' expecting the "Repeats and Jumps" palette to be highlighted. Prior to this commit, pressing 'R' would instead trigger the application shortcut "Repeat selection", which enters notes in the score.
5fc83ae
to
937e7f5
Compare
I tested on macOS and it worked for me. However, it is possible that 'L' was being swallowed by an application shortcut (i.e. if you defined one in Preferences). If that's the case then the latest commit should fix it. |
Resolves: no issue in tracker
If the user presses a letter key while in the Palettes tree then a matching palette or cell gains focus. E.g. Press 'L' to jump to the Lines palette.
Pressing multiple keys in quick succession enables incremental search. E.g. Press 'A' shortly followed by 'R' to skip Accidentals and go straight to Articulations.
Pressing the same key repeatedly cycles through matching items. E.g. 'T' => Time Signatures, 'T' => Text, 'T' => Tempo, 'T' => Time Signatures, etc.