-
Notifications
You must be signed in to change notification settings - Fork 13.8k
rustdoc-search: redesign throbber to be less distracting #146385
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
Conversation
Some changes occurred in HTML/CSS/JS. |
rustbot has assigned @GuillaumeGomez. Use |
I disagree: how do I know there is nothing more to load? |
Lol, that's so funny. That's exactly what I started to do subconsciously looking back >.< As a middle ground, we could maybe hide the throbbers for the inactive/unselected tabs (only making them (re)appear once you select the relevant tab)? Unsure if that'll help in any way. |
The number isn't shown until it's done. |
And that made me think it was a bug. ^^' |
So thinking about it some more (although I REALLY love this loading animation), maybe what is missing is instead a marker to notify that the search is complete. |
random idea: move the throbber to the end of the results, so it's only visible if the user has scrolled past all of the results that have already been loaded. |
Could work too I guess. |
Here's a version using @lolbinarycat's idea. |
Can you host it somewhere please? |
Doesn't render as nicely but if that makes people happy... |
I'm confused. What's not as nice about it? |
Not sure exactly. Just "feel" less good but I honestly can't word what's bugging me... |
Right now, the loading throbber in result tabs is a major motion sickness trigger. Every time I go to use nightly rustdocs, I have to ask myself whether the results I'm going to get is worth becoming sick. And usually the answer is no, so in practice I've mostly stopped using nightly rustdocs. Putting the throbber at the bottom of the results list is still a motion sickness trigger, for as long as the result list is short enough to not push it off the bottom of the page. I don't think it's a good idea to make users sick, when a less obtrusive indicator at the bottom of the result list could do just as good a job at conveying that the result list is not (necessarily) complete. |
sounds like we should be disabling it when prefers-reduced-motion is set |
Fair point. |
Complaints about it being distracting, and causing people to wait until all of the results are loaded instead of using the incremental results as they come in, make me think this is a bad idea.
This change is a response to complaints about motion sickness.
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
I agree with @notriddle's comment. Can you host the new version somewhere please? :) |
https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html has been updated with the current version. |
Can we keep the hourglass in the searchbar? |
We could, but why? |
So it's easier to track the status. Since it's not animated, I don't think people will feel the need to wait for the search to be complete before looking at the results. |
Alright, I've pushed an update to this PR and to https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html |
The hourglass doesn't remain in the searchbar, I still see it below the results. ;) |
I pushed the change, but it hasn't propagated yet. Try again once https://github.com/notriddle/rustdoc-html-demo-12/actions/runs/18322977439 shows everything ✔️ Done. |
Ok I confirmed it works. Quite convenient to deploy. :o |
Please add a GUI test for the presence of the hourglass when starting search (try doing a big one just in case ^^') and its absence once search is done. |
Some changes occurred in GUI tests. |
Thanks! @bors r+ rollup |
Rollup of 5 pull requests Successful merges: - #146385 (rustdoc-search: redesign throbber to be less distracting) - #147390 (Use globals instead of metadata for std::autodiff) - #147445 (sort attribute targets for more consistent error messages) - #147448 (collect-license-metadata: update submodules before running) - #147451 (fix panic with extra-const-ub-checks) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #146385 - notriddle:no-anim, r=GuillaumeGomez rustdoc-search: redesign throbber to be less distracting Preview: https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html <img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/da838ee0-3f7a-4b10-ba92-f9ac52e9f723" /> <img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/b5a59fc0-5d07-4981-b1dd-0b60556a0dd5" /> <img width="1920" height="182" alt="image" src="https://github.com/user-attachments/assets/bb587660-7b6c-40e1-a7ae-2270d530dcd4" /> Complaints about it being distracting, and causing people to wait until all of the results are loaded instead of using the incremental results as they come in, make me think it was a bad idea to put it in the tab. Part of #146048
Preview: https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html
Complaints about it being distracting, and causing people to wait until all of the results are loaded instead of using the incremental results as they come in, make me think it was a bad idea to put it in the tab.
Part of #146048