Uh oh!
There was an error while loading. Please reload this page.
Improve search result tab handling - #80382
Conversation
rust-highfive
commented
Dec 26, 2020
Some changes occurred in HTML/CSS/JS. |
pickfire
commented
Dec 27, 2020
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? |
GuillaumeGomez
commented
Dec 27, 2020
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? |
GuillaumeGomez
commented
Dec 27, 2020
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 ? |
jyn514
commented
Dec 30, 2020
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? |
Uh oh!
There was an error while loading. Please reload this page.
…ty one. If all are empty, the current one doesn't change.
33c75d6 to
3337767Comparejyn514
commented
Jan 19, 2021
r? @Nemo157 |
GuillaumeGomez
commented
Jan 19, 2021
@bors: r=Nemo157,pickfire rollup |
bors
commented
Jan 19, 2021
📌 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 (Fixesrust-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