Skip to content

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Sep 9, 2025

Preview: https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html

image image image

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

@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha, @lolbinarycat

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Sep 9, 2025
@rustbot
Copy link
Collaborator

rustbot commented Sep 9, 2025

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@GuillaumeGomez
Copy link
Member

I disagree: how do I know there is nothing more to load?

@fmease
Copy link
Member

fmease commented Sep 10, 2025

causing people to wait until all of the results are loaded instead of using the incremental results as they come in

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.

@notriddle
Copy link
Contributor Author

I disagree: how do I know there is nothing more to load?

The number isn't shown until it's done.

@GuillaumeGomez
Copy link
Member

I disagree: how do I know there is nothing more to load?

The number isn't shown until it's done.

And that made me think it was a bug. ^^'

@GuillaumeGomez
Copy link
Member

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.

@lolbinarycat
Copy link
Contributor

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.

@GuillaumeGomez
Copy link
Member

Could work too I guess.

@rustbot rustbot added the A-rustdoc-search Area: Rustdoc's search feature label Sep 10, 2025
@notriddle
Copy link
Contributor Author

Here's a version using @lolbinarycat's idea.

@GuillaumeGomez
Copy link
Member

Can you host it somewhere please?

@notriddle notriddle changed the title rustdoc-search: remove animated throbber rustdoc-search: move animated throbber to bottom of results list Sep 10, 2025
@notriddle
Copy link
Contributor Author

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Sep 10, 2025

Doesn't render as nicely but if that makes people happy...

@notriddle
Copy link
Contributor Author

I'm confused. What's not as nice about it?

@GuillaumeGomez
Copy link
Member

Not sure exactly. Just "feel" less good but I honestly can't word what's bugging me...

@Zalathar
Copy link
Contributor

Zalathar commented Oct 4, 2025

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.

@lolbinarycat
Copy link
Contributor

sounds like we should be disabling it when prefers-reduced-motion is set

@GuillaumeGomez
Copy link
Member

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.
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

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.

@notriddle
Copy link
Contributor Author

@Zalathar

I've put together another design that doesn't rely on motion, so, hopefully, this should satisfy everybody.

image

@lolbinarycat

I know we're already using prefers-reduced-motion in one spot, but I'd prefer to avoid it where feasible in favor of an accessible-by-default behavior, because:

  • media queries and configuration options both significantly increase our QA burden when we use them (we have to test both versions)
  • a lot of people aren't able to configure the computer they're using (because it's not actually "their" computer, or because they just don't know how)

@notriddle notriddle changed the title rustdoc-search: move animated throbber to bottom of results list rustdoc-search: redesign throbber to be less distracting Oct 6, 2025
@GuillaumeGomez
Copy link
Member

I agree with @notriddle's comment. Can you host the new version somewhere please? :)

@notriddle
Copy link
Contributor Author

https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html has been updated with the current version.

@GuillaumeGomez
Copy link
Member

Can we keep the hourglass in the searchbar?

@notriddle
Copy link
Contributor Author

We could, but why?

@GuillaumeGomez
Copy link
Member

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.

@notriddle
Copy link
Contributor Author

Alright, I've pushed an update to this PR and to https://notriddle.com/rustdoc-html-demo-12/throbber/std/index.html

@GuillaumeGomez
Copy link
Member

The hourglass doesn't remain in the searchbar, I still see it below the results. ;)

@notriddle
Copy link
Contributor Author

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.

@GuillaumeGomez
Copy link
Member

Ok I confirmed it works. Quite convenient to deploy. :o

@GuillaumeGomez
Copy link
Member

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.

@rustbot
Copy link
Collaborator

rustbot commented Oct 7, 2025

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 7, 2025

📌 Commit c9293bf has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 7, 2025
bors added a commit that referenced this pull request Oct 8, 2025
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
@bors bors merged commit 291e129 into rust-lang:master Oct 8, 2025
10 checks passed
@rustbot rustbot added this to the 1.92.0 milestone Oct 8, 2025
rust-timer added a commit that referenced this pull request Oct 8, 2025
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
@notriddle notriddle deleted the no-anim branch October 8, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-search Area: Rustdoc's search feature S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants