-
Notifications
You must be signed in to change notification settings - Fork 198
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
Fixes footer with new sidebar changes #1619
Conversation
f783554
to
84229ad
Compare
I'm about to head out on a ride, but a quick question: do we need the
footer, design-wise? It seems really hard to integrate it with rustdoc, and
it's already really hard to combine rustdoc styles with docs.rs styles.
Maybe it would be easier to put these items in one of the topbar menus?
|
Also I'm not super attached to the rustdoc sidebar varying width. It seemed
maybe nice to give back some more space on smaller screens and narrower
docs, but if it causes other design headaches we can just ditch it.
|
I'm not sure about this. Needs to ask others what they think about it. A big problem is that the top navbar is already very "heavy" content-wise. |
The problem is that some crates already use this new style. And also, I personally like it (but it's just my opinion). |
84229ad
to
b290aa2
Compare
r? @Nemo157 |
Empirically it appears that this style works on docs from 2021-12-14 just fine if |
You mean
You mean having this rule instead: |
Well, 2021-12-14 is one of the versions that would use the 2021-12-05 css and happened to be the one I found first while looking for a crate to test on.
Yep. In fact, |
It existed in 1.58: https://doc.rust-lang.org/1.58.0/std/ |
Yep, but not in 2022-01-19+ that this css is targeting (or I think in 2021-12-05+ that the previous css was targeting). |
b290aa2
to
aa84100
Compare
I updated the date to |
@GuillaumeGomez @Nemo157 how can we proceed here? I see a test is failing, what else is missing? |
The reason I brought up this potentially working with all post-2021-12-05 docs is that we really need to minimize the number of css variations we have. The more we need to maintain the harder it becomes to do any changes that affect them (especially as we don't have a really easy way to test older versions outside deploying to production and checking the prebuilt docs). My assumption is that if it is a change from 2022-01-19 that prompts this change, and 2021-12-14 works, then everything from 2021-12-05 -- 2022-01-19 will probably work too, and we can just change the 2021-12-05 css and not introduce a new variation. |
aa84100
to
a31b2a8
Compare
Finally took the time to come back to this. @Nemo157 was right: it works just fine with 2021-12-05 crates as well. |
@GuillaumeGomez thanks for checking! so this is ready for another review? perhaps by @Nemo157 ? |
Fixes #1613.
Since rust-lang/rust#92692, the sidebar width varies between 200 and 250 pixels, making it impossible to adapt the footer to this change without integrating it into the rustdoc main container directly. Another interesting change that was added to the sidebar was
position: sticky
which allowed me instead to move the footer completely at the bottom and to addmargin-bottom
on the sidebar. Here is a video of the change when you scroll to the end of the page:Peek.2022-01-22.21-30.mp4
cc @syphar @jsha