Skip to content
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

Rustdoc style cleanups #92830

Merged
merged 2 commits into from
Jan 18, 2022
Merged

Rustdoc style cleanups #92830

merged 2 commits into from
Jan 18, 2022

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Jan 12, 2022

  • Make "since" version numbers grey again (regressed in Make source links look cleaner #92602).
  • Remove unneeded selectors for when crate filter dropdown is a
    sibling of search-input.
  • Crate filter dropdown doesn't need to be 100% width on mobile.
  • Only build crate filter dropdown when there is more than one crate.
  • Remove unused addCrateDropdown

Demo: https://rustdoc.crud.net/jsha/style-cleanups/std/string/struct.String.html

r? @GuillaumeGomez

@jsha jsha 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) labels Jan 12, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 12, 2022
@camelid
Copy link
Member

camelid commented Jan 12, 2022

I think I kind of liked the source link being darker, but I don't feel strongly either way.

@jsha
Copy link
Contributor Author

jsha commented Jan 13, 2022

This actually keeps the source link the same color (#3873AD), but changes the non-linked text (1.0.0 ·) to be grey. Also, this only affects the light theme; the other themes continue to have the (1.0.0 ·) in a less emphasized color.

Though that reminds me - originally, the 1.0.0 was grey because of a .since selector. I changed that to .rightside to bring in the dot as well. I should change the selectors in the other themes.

@camelid
Copy link
Member

camelid commented Jan 13, 2022

Sorry, I meant the version number; I wrote the wrong word :)

@GuillaumeGomez
Copy link
Member

Please add a GUI test for the font color on the since text. Otherwise looks all good to me!

@jsha
Copy link
Contributor Author

jsha commented Jan 15, 2022

Please add a GUI test for the font color on the since text. Otherwise looks all good to me!

I tried this, but got "stability attributes may not be used outside the standard library."

@camelid
Copy link
Member

camelid commented Jan 15, 2022

@jsha add #![feature(staged_api)]

@jsha jsha force-pushed the style-cleanups branch 2 times, most recently from 3c81a0a to 2ec8eda Compare January 15, 2022 03:31
@GuillaumeGomez
Copy link
Member

Thanks a lot for adding this new GUI test crate. And thanks to @camelid for answering your questions! :)

 - Make "since" version numbers grey again (regressed in rust-lang#92602).
 - Remove unneeded selectors for when crate filter dropdown is a
   sibling of search-input.
 - Crate filter dropdown doesn't need to be 100% width on mobile.
 - Only build crate filter dropdown when there is more than one crate.
 - Remove unused addCrateDropdown.
@GuillaumeGomez
Copy link
Member

Apart from my last comment, all good for me! r=me once you added it. Thanks!

@jsha
Copy link
Contributor Author

jsha commented Jan 18, 2022

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Jan 18, 2022

📌 Commit ae99e23 has been approved by GuillaumeGomez

@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 Jan 18, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 18, 2022
…askrgr

Rollup of 14 pull requests

Successful merges:

 - rust-lang#92629 (Pick themes on settings page, not every page)
 - rust-lang#92640 (Fix ICEs related to `Deref<Target=[T; N]>` on newtypes)
 - rust-lang#92701 (Add some more attribute validation)
 - rust-lang#92803 (Hide mobile sidebar on some clicks)
 - rust-lang#92830 (Rustdoc style cleanups)
 - rust-lang#92866 ("Does exists" typos fix)
 - rust-lang#92870 (add `rustc_diagnostic_item` attribute to `AtomicBool` type)
 - rust-lang#92914 (htmldocck: Add support for `/text()` in ``@snapshot`)`
 - rust-lang#92923 (Abstract the pretty printer's ringbuffer to be infinitely sized)
 - rust-lang#92946 (Exclude llvm-libunwind from the self-contained set on s390x-musl targets)
 - rust-lang#92947 (rustdoc: Use `intersperse` in a `visit_path` function)
 - rust-lang#92997 (Add `~const` bound test for negative impls)
 - rust-lang#93004 (update codegen test for LLVM 14)
 - rust-lang#93016 (Stabilize vec_spare_capacity)

Failed merges:

 - rust-lang#92924 (Delete pretty printer tracing)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit deee6f7 into rust-lang:master Jan 18, 2022
@rustbot rustbot added this to the 1.60.0 milestone Jan 18, 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) 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants