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

Remove underlines from non-top docblocks. #90156

Merged
merged 1 commit into from
Oct 30, 2021

Conversation

jsha
Copy link
Contributor

@jsha jsha commented Oct 22, 2021

We still had a number of places where underlined section headings would
show up, like under Implementations.

Follow-up to #89506 (thanks @yaymukund!) and #90036. Related to #59829.

r? @camelid

Demo:

Before:

image

After:

image

@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 22, 2021
@GuillaumeGomez
Copy link
Member

Looks good to me. I'm not sure if adding a test would help here since we're removing something... My test-maniac brain tells me yes but I don't see how a test could really help here. Can you maybe check the font-size at least in different docblocks for different headings please?

@jsha
Copy link
Contributor Author

jsha commented Oct 22, 2021

Good idea! I added a test that checks the font size of a variety of different headings, in both Prose and Rusty headings. It's a nice snapshot of how we do headings today, and the HTML it generates is a nice way to look at a variety of heading levels and see if they make sense.

@camelid
Copy link
Member

camelid commented Oct 22, 2021

UI looks good to me, except could you adjust the margins like in #90036? Also, the heading level regression from #89506 is present on beta; should we try to fix it on beta too or is it not worth it?

@GuillaumeGomez
Copy link
Member

Also, the heading level regression from #89506 is present on beta; should we try to fix it on beta too or is it not worth it?

Considering it's small and easy to backport, I'd be in favour of backporting it to beta.

@camelid
Copy link
Member

camelid commented Oct 22, 2021

Considering it's small and easy to backport, I'd be in favour of backporting it to beta.

@Mark-Simulacrum would it be reasonable to open a PR to the beta branch that just fixes the heading level (it's a very small fix)? I don't think it'd be good to backport this whole PR since it makes other changes and somewhat depends on previous PRs that haven't made it to beta yet.

If Mark says it's okay, could you open a PR to the beta branch with just the bugfix @jsha?

@jsha
Copy link
Contributor Author

jsha commented Oct 22, 2021

Actually, poking around I'm finding a couple of other places that need the H2->H4 fix. I'll start a separate PR that has those fixes, plus the rustdoc-gui unittest. For now I'll pull those changes out of this PR.

@jsha
Copy link
Contributor Author

jsha commented Oct 22, 2021

I'm going to consider this blocked on #90186 because without that change, the styles won't apply to the heading tags (since they're being generated with the wrong heading level).

@jsha jsha added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 22, 2021
@camelid camelid added A-rustdoc-ui Area: Rustdoc UI (generated HTML) S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 23, 2021
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Oct 25, 2021
…omez

Fix documentation header sizes

And add a rustdoc-gui test confirming various header sizes.

Split off from rust-lang#90156. This fixes a regression in rust-lang#89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls.

r? `@camelid`

Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 25, 2021
…omez

Fix documentation header sizes

And add a rustdoc-gui test confirming various header sizes.

Split off from rust-lang#90156. This fixes a regression in rust-lang#89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls.

r? ``@camelid``

Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 26, 2021
…omez

Fix documentation header sizes

And add a rustdoc-gui test confirming various header sizes.

Split off from rust-lang#90156. This fixes a regression in rust-lang#89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls.

r? `@camelid`

Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 27, 2021
Fix documentation header sizes

And add a rustdoc-gui test confirming various header sizes.

Split off from rust-lang#90156. This fixes a regression in rust-lang#89506 where the heading level of titles within Markdown was too high (h2) for docblocks under structs, unions, and enum impls.

r? `@camelid`

Demo: https://jacob.hoffman-andrews.com/rust/fix-header-sizes/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Stable: https://doc.rust-lang.org/stable/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
Beta: https://doc.rust-lang.org/beta/std/string/struct.String.html#impl-Add%3C%26%27_%20str%3E
@jsha
Copy link
Contributor Author

jsha commented Oct 30, 2021

I've rebased on top of #90186. @GuillaumeGomez want to take a second look and give bors approval if it's still looking good?

@jsha jsha added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Oct 30, 2021
We still had a number of places where underlined section headings would
show up, like under Implementations.
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Oct 30, 2021

📌 Commit a65c98f 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 Oct 30, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 30, 2021
…laumeGomez

Rollup of 5 pull requests

Successful merges:

 - rust-lang#90156 (Remove underlines from non-top docblocks.)
 - rust-lang#90183 (Show all Deref implementations recursively)
 - rust-lang#90202 (Improve and test cross-crate hygiene)
 - rust-lang#90375 (Use `is_global` in `candidate_should_be_dropped_in_favor_of`)
 - rust-lang#90399 (Skipping verbose diagnostic suggestions when calling .as_ref() on type not implementing AsRef)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ec83b95 into rust-lang:master Oct 30, 2021
@rustbot rustbot added this to the 1.58.0 milestone Oct 30, 2021
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.

6 participants