-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Search panes #1521
Search panes #1521
Conversation
…d selections and scroll correctly
Hey @msirringhaus - I took an initial look and this looks great! I'm going to test it and review it over the next few days and give feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've had a chance to do a full review. First thing, let me say: this is top-notch work. You dived head-first into a non-trivial code-base, figured it out and managed to add a very non-trivial feature. Your changes are concise, not touching more than they absolutely have to, and I was personally very impressed by your eye for edge cases an UX details.
I left comments in the code, mostly about moving stuff around and breaking large functions down to make them more maintainable (I realize I'm holding you to higher standards than some of the code-base, but I have to be sure I'm able to effortlessly maintain this on my own if I have to).
Additionally, some UX comments and minor bugs:
- In the case of terminals as opposed to the web for example, I think the next/previous commands should be inverse. 99% of the time the user will search for something while being on the last line of the viewport and is looking up. The next instance should be the one above them.
- A small bug: search results that are at the end of the line color the background of the whole line until the end
- The various search toggles need some sort of UI indication. It's impossible for me as a user to know whether my current search is case-sensitive or whole-word. See next point for a suggestion.
- I think the search term should appear in the pane frame while searching as well. Something like
SEARCHING FOR: my-search-term
, in the future we could add the occurrence too, eg.SEARCHING FOR: my-search-term 5/10
. This can also be a good place to indicate the search feature toggles, eg.SEARCHING FOR: my-search-term [case-sensitive, whole-word]
- I'm not tied to the square bracket, just a suggestion. - One big snag here is that search is unusable without pane frames (eg. when we toggle them off with ctrl-p + z). The best solution here would be to somehow move the search UI somewhere else (such as the status-bar), but I realize that can be a tall order. We could probably get away with temporarily enabling pane-frames while searching and disabling them again when exiting search. Not ideal... unless you have a better idea?
As we discussed last week on our Matrix chat, I'll take it upon myself to implement changing the foreground color of searches to make them more readable. But I think I'll wait until you implement these changes to avoid merge conflicts.
Once again - awesome work. Looking forward to seeing this merged and released.
(EDIT) Almost forgot:
We also need to fix the e2e tests. I think they're failing because the UI here was changed. They also use cargo insta - you can find more info about running them here: https://github.com/zellij-org/zellij/blob/main/CONTRIBUTING.md#running-the-end-to-end-tests
And also: the CI is complaining about rustfmt and clippy. We'll also need to fix these before merging.
ced8e59
to
bd247ce
Compare
…ve duplicate code
Hey @msirringhaus - I merged main as promised. I still owe you fixing the foreground styles of the marked results, but I think it's not blocking for you, right? I'll try to get to it ASAP |
Wow, thanks! And no, it's not blocking. I'll try to get to the rest of the feedback ASAP as well, so we can hopefully land this thing |
Right, @msirringhaus - I just implemented the search foreground. Let me know what you think. Also, I took the liberty of updating the e2e snapshots to get that off your plate. Let me know if I can help with anything else! |
Awesome about the merge and implementation of the frontcolor! It looks perfect now! I love it.
I'll try to take a look at this ASAP, but not today anymore :-) Edit: About renaming forward/backward to up/down: I was very happy I did that, before I started refactoring the search-functions. It is so much more clear which direction I'm currently looking at :-) |
Ok, I found the highlighting-bug. Unless I overlooked something, we are all set now? |
…lij-org#1586) * fix(terminal): persist cursor hide/show through alternate screen * style(fmt): rustfmt * style(clippy): make clippy happy
…ellij-org#1587) * fix(editor): handle editor/visual/configured editor with arguments * style(fmt): rustfmt
…1584) * if left click is on pane border do not forward to application * properly handle frames * fix comment * fix another comment * add tests, fix edge case
Flake lock file updates: • Updated input 'crate2nix': 'github:kolloch/crate2nix/2d20dec4ae330f39b0bebeb8eb4a201b58d2b82c' (2022-07-09) → 'github:kolloch/crate2nix/45d97c7ce62c3d53954743057ceb32e483c31acd' (2022-07-12) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/b39924fc7764c08ae3b51beef9a3518c414cdb7d' (2022-07-08) → 'github:nixos/nixpkgs/4a01ca36d6bfc133bc617e661916a81327c9bbc8' (2022-07-14) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/3dfc78e42a285caaf83633224a42e7fb7dde191b' (2022-07-10) → 'github:oxalica/rust-overlay/2cd36d4aef875867ee1d7963541ccb3ae50b358c' (2022-07-16) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@msirringhaus - I found and fixed a minor bug: if you searched for something, then moved to a different pane without switching modes (eg. with Otherwise, this looks great. I'll wait for CI to pass and then do one last go before I merge. |
...and another minor one fixed: when the pane being search was being actively updated, the search results would get out of whack as well (eg. We already had a mechanism for handling this when scrolling, so I tapped into it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msirringhaus - everything looks good to me and I'm about to merge this.
Thank you very much for your sustained and tremendous efforts here. This has been a greatly requested and anticipated feature for a long time and your implementation is fantastic. I'm very much looking forward to releasing it in the near future.
I also had fun working with you on this, and while I know you having time to contribute was a special circumstance, I still hope to see contributions from you to Zellij in the future.
Well no. Thank you very much for your tremendous patience, guidance and for the fun experience! :-) |
Current draft, before I start working on it in earnest in 2 weeks.