-
Notifications
You must be signed in to change notification settings - Fork 12.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
Improve search result tab handling #80382
Improve search result tab handling #80382
Conversation
Some changes occurred in HTML/CSS/JS. |
Do you have some examples on the behavior after this patch? Or if there is any weird cases when people remove characters from search result? Or if people specifically select a tab then it switch away automatically which confuses others? |
I gave one. Test this change with "-> String".
I don't understand the question.
It only switches automatically when you perform a new search if the current tab is empty and one of the others isn't. |
First, when you search "-> string", then you search "hello -> string", would the tab page changed? What if people search "string", click on "In Parameters" tab, and then search "-> string"? Would it be "In Paremeters" tab or "In Return Types" tab? |
It's being done when the search results are displayed, so if you are on the "Parameters" tab and make a new search with no results in this tab but with results in another, it'll change the current tab (but only if at least one other tab isn't empty). If you're suggesting that in case we are already on the search results page, we don't want to switch the current tab if we make another search, I can update the PR to take it into account. Did I understand you correctly and does this suggestion seems good to you? To you too maybe @jyn514 ? |
I don't think we should keep state from the previous search; changing to the new tab seems fine to me. You can always navigate back to the empty tab if you really wanted to be there. The implementation looks fine to me, but I'd prefer to get a second opinion on the change in behavior - @Manishearth what do you think? |
…ty one. If all are empty, the current one doesn't change.
33c75d6
to
3337767
Compare
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.
Looks good to me.
r? @Nemo157 |
@bors: r=Nemo157,pickfire rollup |
📌 Commit 3337767 has been approved by |
…laumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#80382 (Improve search result tab handling) - rust-lang#81112 (Remove unused alloc::std::ops re-export.) - rust-lang#81115 (BTreeMap: prefer bulk_steal functions over specialized ones) - rust-lang#81147 (Fix structured suggestion for explicit `drop` call) - rust-lang#81161 (Remove inline script tags) - rust-lang#81164 (Fix typo in simplify.rs) - rust-lang#81166 (remove some outdated comments regarding debug assertions) - rust-lang#81168 (Fixes rust-lang#81109 - Typo in pointer::wrapping_sub) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
…, r=jyn514 Add test to ensure search tabs behaviour It adds a GUI test for rust-lang#80382. r? `@jyn514`
…, r=jyn514 Add test to ensure search tabs behaviour It adds a GUI test for rust-lang#80382. r? ``@jyn514``
…, r=jyn514 Add test to ensure search tabs behaviour It adds a GUI test for rust-lang#80382. r? ```@jyn514```
Fixes #80378.
If the current search result tab is empty, it picks the first non-empty one. If all are empty, the current one doesn't change. It can be tested with "-> string" (where only the "returned elements" tab is not empty).
r? @jyn514