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: consistentize sidebar HTML generation #92986

Closed
jsha opened this issue Jan 16, 2022 · 3 comments · Fixed by #93780
Closed

Rustdoc: consistentize sidebar HTML generation #92986

jsha opened this issue Jan 16, 2022 · 3 comments · Fixed by #93780
Assignees
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

@jsha
Copy link
Contributor

jsha commented Jan 16, 2022

In the Rustdoc sidebar (e.g.), some sections (like Methods) are organized like:

<div class="block items">
  <h3>Some Title</h3>
  <div class="sidebar-links">
    <a>foo</a>
    <a>bar</a>
  </div>
</div>

Others, under "In <module>", like Structs or Functions, are organized like:

<div class="block fn">
  <h3>Some Title</h3>
  <ul>
    <li><a>foo</a></li>
    <li><a>bar</a></li>
  </ul>
</div>

The latter is semantically preferable. We should consolidate on using <ul> / <li> in both types of sidebar sections, to make maintaining our CSS easier and more consistent.

@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 16, 2022
@GuillaumeGomez
Copy link
Member

It seems it has been done already (can't find the PR though...). Closing.

@jsha
Copy link
Contributor Author

jsha commented Feb 8, 2022

Hasn't been done yet. See for instance this example in https://doc.rust-lang.org/nightly/std/fs/struct.File.html:

image

It's all plain links; we'd prefer them to be a list.

@GuillaumeGomez
Copy link
Member

Oh I see, missed that. Reopening and I'll do it too.

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.

2 participants