Skip to content

Changing file on latest rustdoc has text slide for 1s #95043

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

Closed
Ten0 opened this issue Mar 17, 2022 · 7 comments · Fixed by #95129
Closed

Changing file on latest rustdoc has text slide for 1s #95043

Ten0 opened this issue Mar 17, 2022 · 7 comments · Fixed by #95129
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@Ten0
Copy link

Ten0 commented Mar 17, 2022

Reproduction

Load https://doc.rust-lang.org/stable/src/core/alloc/layout.rs.html#436
Open files panel on the left.
Refresh page.

You'll notice everytime you load the page, the file list slides again. So we now have to wait 1s for it to stop sliding before starting to read the file we clicked on.

Note

Btw, I'd rather this never slides at all. This is time loss anyway. Could there be an option to disable this?

@Ten0 Ten0 added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Mar 17, 2022
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Mar 17, 2022
@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) and removed C-bug Category: This is a bug. I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-untriaged Untriaged performance or correctness regression. labels Mar 17, 2022
@GuillaumeGomez
Copy link
Member

So there are two different things here apparently:

  • removing the animation
  • Don't remember the file sidebar state

Did I get it right?

@Ten0
Copy link
Author

Ten0 commented Mar 17, 2022

Yes absolutely 🙂🙏

A single simple solution to both "things" could be to completely remove the animation.
I don't know of any IDE that does this - probably because it isn't optimal with regards to ergonomics.
The fact the new panel now slides the code so we can read the code and have the panel open at the same time is still an improvement over the previous panel, even if we revert the animation part.

@GuillaumeGomez
Copy link
Member

I think the idea behind the animation is to allow the reader to see that it's not hovering the code. As for the setting, not sure.

What do you think @jsha?

@jsha
Copy link
Contributor

jsha commented Mar 18, 2022

I agree with @Ten0, we should remove the animation. It bothers me as well, I just haven't found the time to file an issue / PR about it. :-) I don't think we should add a setting.

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Mar 18, 2022

Ok, I'll remove the animation then. Will send a PR tomorrow. For the setting, it's that we keep the current save the state of the sidebar. Should I remove it as well?

@Ten0
Copy link
Author

Ten0 commented Mar 18, 2022

For the setting, it's that we keep the current save the state of the sidebar. Should I remove it as well?

My idea of new setting was rather "should there be an animation or should it be static", if we didn't want to remove the animation completely, for those of us that don't think the animation is worth the wait (so no need for a such new setting if we just remove the animation completely :) )

With regards to the other setting idea you seem to be talking about, it seems reasonable to me to always keep the current state of the sidebar, as we currently do, and not add an extra setting for that either :)

@GuillaumeGomez
Copy link
Member

Oh ok. Well, that cleared things up. I'll just remove the animation then.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Mar 21, 2022
…imation, r=jsha

Remove animation on source sidebar

Fixes rust-lang#95043.

Didn't upload a demo considering how simple it is to test in a browser. :)

r? `@jsha`
@bors bors closed this as completed in 7154fa5 Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants