-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: linkify "Structs", "Traits", etc., in sidebar #92957
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
Comments
jsha
added
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
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 16, 2022
So, for instance, sidebar heading |
@rustbot claim |
Yes, that's correct. |
@jsha Thanks |
@chansuke any progress on this? I'd like to get it landed before the beta cut, so we have a consistent UI where headings in the sidebar are clickable. |
@jsha sorry, i couldn't make time last week.ok,i will unassign me, thanks. |
This was referenced Jan 31, 2022
m-ou-se
added a commit
to m-ou-se/rust
that referenced
this issue
Feb 7, 2022
…illaumeGomez Linkify sidebar headings for sibling items Also adjust CSS so this doesn't produce excess padding/margin. Note: I tried and failed to write a test with browser-UI-test. First I tried to `assert-property: (".block.mod h3 a", {"href": "index.html#macros"})`. But the `href` that gets read out is the fully-quallified URL, starting with `file:///`. That URL will differ depending on what path the test is run from, so that doesn't work. Next I tried clicking on the appropriate sidebar link, and verifying that the appropriate heading on the next page is highlighted with the right background color. However, that also didn't work: according to browser-UI-test, the targeted heading was plain white. However, running with no-headless, I could see that it actually was yellow. I suspect this is a bug in the older version of Chromium used with browser-UI-test's bundled puppeteer, since it doesn't reproduce on latest Chrome. Fixes rust-lang#92957 Demo: https://rustdoc.crud.net/jsha/linkify-sidebar-headings/std/string/trait.ToString.html r? `@GuillaumeGomez`
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 8, 2022
Fix hover effects in sidebar The dark and ayu themes have a menu-like highlight on sidebar items. The light theme used to, but it was accidentally lost in the sidebar unification. The change brings back the hover effect in the light theme. It also makes the hover effect apply consistently to all links in the sidebar, including headings. It also simplifies the "In _path_" heading so it's one big link. The breadcrumbs are still readily available at the top of the page. Note that a small number of headings are not linkified and so don't get the hover effect. That will be fixed with rust-lang#92957. Demo: https://rustdoc.crud.net/jsha/sidebar-hover/std/string/trait.ToString.html r? `@GuillaumeGomez` Fixes rust-lang#93115
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)
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
In rustdoc sidebars, most headings are clickable links. For instance, "Required Methods" and "Implementors" in the sidebar of https://doc.rust-lang.org/nightly/std/string/trait.ToString.html.
However, the headings under "Other items in..." are not clickable. We should link those to the appropriate subheading on the module page. That allows the user to see a more verbose listing of items in the module, since each one has a description alongside it.
The text was updated successfully, but these errors were encountered: