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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: Left strip search text to avoid empty search results #700
bugfix: Left strip search text to avoid empty search results #700
Conversation
@preetmishra I'd like to get #699 fixed in a similar way, as I commented there, but this looks reasonable as a v0 in terms of the specific issue I mentioned there, from a quick test. However, I just gave this a try and for at least the stream list we seem to scroll it even with a space. Is there a different way to fix this that would resolve that too, do you think? Or is that a different bug? |
9cf25af
to
7e733c1
Compare
@neiljp Thanks for the review. Re scrolling issue, I gather it is a different bug. I have added a fix, in a separate commit, to resolve this. |
Note: The stream/topic list doesn't get updated when we completely clear out/backspace an active search as well. This might feel a bit unintuitive but this behaviour already exists in the user search. Would we want to eradicate this behaviour from all of the |
@preetmishra The behavior of the user search has been what I consider buggy for some time - eg. Another aspect that this appears to fail on is that while the left-stripped search strings do find results, |
7e733c1
to
cb285de
Compare
@neiljp Thanks for the review and the exposition. In the latest update, I have resolved the user search issue, the cancel search issue and reworked the approach to fix the scrolling issue. However, the scrolling issue fix, the last commit, has a regression where the stream/topic list is shifted when Besides, the first three commits work as expected and should be good to go. |
This amends PanelSearchBox and related update functions to treat spaces as an empty search by using left strip, i.e., the search is canceled and the list is not updated.
This amends update_streams and update_topics to set the log focus to the start while the search is active. NOTE: Sets a regression in the focus_index_before_search logic where now the list shifts itself after 'esc' is pressed.
cb285de
to
addb62c
Compare
@preetmishra Thanks for working on this and the associated earlier commits - which were merged already. As per agreement elsewhere, we'll likely move forward with an approach like in #784, though we can always return to this if we change our mind 馃憤 |
This amends
PanelSearchBox
's update functions to avoid empty search results for spaces.@neiljp Thanks for reporting the bug in #699 (review). 馃憤