-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Picker
s "v2"
#9647
Picker
s "v2"
#9647
Conversation
For pickers with a single column, could we just hide the header in that case? That way it ends up looking like the original picker |
Just a couple things I noticed I haven't read trough all of it yet |
Yep actually we don't render the header if helix/helix-term/src/ui/picker.rs Lines 753 to 758 in e93685b
helix/helix-term/src/ui/picker.rs Lines 476 to 484 in e93685b
So the file picker doesn't look or behave any differently for example |
e93685b
to
827aeac
Compare
Very nice! For a slightly more compact look the column headers could be rendered with a different background - instead of having the line below. |
827aeac
to
fb63290
Compare
Yeah the separator lines were a little bulky. I removed the separators and added a theme key only for the header text |
or even move them into the separator below the input, similar to dbg mockups? |
02554fb
to
71e1d2f
Compare
That's much more complicated implementation-wise - we would probably need to change the table rendering in |
71e1d2f
to
3d78673
Compare
36a8e27
to
1dfbfe4
Compare
Wow, we have to get this on master! This solves my main issue with Helix. Brilliant work @the-mikedavis!!! |
Just started testing this. First of all, great work! One suggestion: Make debounce timeouts configurable. I have reduced them significantly (highlight: 150 -> 33 (I have a key-repeat synced to frame-rate, reason why it's so low while still debouncing effectively when scrolling), dynamic query: 275 -> 75). I have noticed flashes when using the |
What do you mean by flashes? Can you capture it in a gif / video / asciinema cast? W.r.t. configurable timeouts see #9668 (comment) |
Sure, here's an asciinema (edit: Just to confirm, since this was tested on a branch merged with all kinds of things, it also occurs on this one) |
Something I have noticed is that the global search no longer reads from the search selection. Which is a minor annoyance for something that completely replaces my use of fzf/rg. |
a8bfa0c
to
9de5f5c
Compare
Just built from master. What a happy surprise to discover that this has been merged! :) So far, so (mostly) good. Rather than open a bunch of issues, I'll quickly share some feedback here. I hope that's okay, seeing as this PR is closed.
Hope this is useful! Let me know if you'd prefer me to open separate issues instead :) |
For 1 see #9647 (comment). The width handling is naive and improvements can be made as follow-up PRs. For 2 there is a debounce now since global_search reruns as you change the query. It's a fairly expensive operation so we could turn down the debounce but the lower it goes the more global search will chip at your battery. I'm aware this breaks muscle memory but I'd rather have a better interface even if it means people have to retrain their muscle memory. |
This is awesome, thanks for all the hard work! |
The correct syntax would be |
Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax.
* Document use of filter columns in pickers. Filtering on columns was implemented in #9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
Im missing the underline's on the table headings. Does it only work with some fonts or something? |
There are new theme keys you can add to your theme to style the headers. In my theme I have basically: "ui.picker.header.column" = { underline.style = "line" }
"ui.picker.header.column.active" = { modifiers = ["bold"], underline.style = "line" } Also see #11343 |
* Document use of filter columns in pickers. Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
* Document use of filter columns in pickers. Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
* Document use of filter columns in pickers. Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
* Document use of filter columns in pickers. Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
* Document use of filter columns in pickers. Filtering on columns was implemented in helix-editor#9647. The only documentation I could find on this feature was the PR itself, and the video demo used a different syntax. * Note that column filters are space-separated. * Note that picker filters can be abbreviated. * Specify correct picker in docs. * Clarify picker filter prefix shortenting. Co-authored-by: Michael Davis <[email protected]> * Move picker docs to their own section. * Update book/src/pickers.md Co-authored-by: Michael Davis <[email protected]> * Improve docs on picker registers, keybinds, and syntax. * Clarify wording around picker queries. Co-authored-by: Michael Davis <[email protected]> --------- Co-authored-by: Ryan Roden-Corrent <[email protected]> Co-authored-by: Michael Davis <[email protected]>
Is there a way to filter for classes and methods to display both simultaneously? Something like "%k class OR %k method" |
As much as I can understand the changes and the switch to the new picker, I think when it comes to global search, I feel usability got worse:
I think if there are multiple columns to filter for, this change is worthwhile, but for the global search where is no other column, I wonder if it wouldn't be better to just omit
Again, this is certainly limited to the global search, but I kind of wish I could just go back to the old approach. It suited my workflow perfectly. I figured I post that here, in case others feel the same. At the same time it's not the end of the world and I'll get used to it. |
I was hoping to make these picker changes as separate PRs but they layer in a way that makes reviewing them independently awkward: one commit changes a block and the next changes it again, so I think it's easier to review altogether. This PR is a kind of "version 2" for the
Picker
component that resolves a bunch of things we've wanted to change aboutPicker
s:DynamicPicker
s, see Workspace symbol search does not support special characters #5714)IdleTimeout
approach for syntax highlighting the preview with an event-system hook (Refactor ad-hoc hooks to use the event system #9629)DynamicPicker
forglobal_search
(interactive global search #196)DynamicPicker
rather thanIdleTimeout
. As a consequence, we can merge theDynamicPicker
type intoPicker
, a refactor that joyously removes this unfortunate block.Shout out to @pascalkuthe's excellent work with the event system (#8021) and Nucleo (#7814) that make this change possible.
NOTE: the syntax in the demos is out of date. Docs are being worked on in #11218.
The table format and filtering by columns (originally posted in #7265):
Dynamic global search running against a very large directory (originally posted in #196):
Related to #9629
Closes #196
Closes #5714
Closes #5446
Closes #3543
Closes #4956
Closes #2109