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: remove unused CSS class in-band #102672

Merged
merged 1 commit into from
Oct 6, 2022

Conversation

notriddle
Copy link
Contributor

Since a7c25b2 removed in-band from code headers, the only remaining uses of the in-band class are:

"<h1 class=\"fqn\">\
<span class=\"in-band\">List of all crates</span>\

<h1 class="fqn"> {#- -#}
<span class="in-band"> {#- -#}

<h1 class=\"fqn\">\
<span class=\"in-band\">Rustdoc settings</span>\

"<h1 class=\"fqn\">\
<span class=\"in-band\">List of all items</span>\

<h1 class=\"fqn\">\
<span class=\"in-band\">About scraped examples</span>\

const traitName = document.querySelector("h1.fqn > .in-band > .trait").textContent;

Since all of these uses are nested below h1.fqn, we can get rid of it, and the support code that was used for when in-band was part of item rendering.

@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Oct 4, 2022
@rustbot
Copy link
Collaborator

rustbot commented Oct 4, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 4, 2022
Comment on lines 637 to 639
<h1 class=\"fqn\">\
<span class=\"in-band\">Rustdoc settings</span>\
Rustdoc settings\
</h1>\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can inline it completely at this point:

Suggested change
<h1 class=\"fqn\">\
<span class=\"in-band\">Rustdoc settings</span>\
Rustdoc settings\
</h1>\
<h1 class=\"fqn\">Rustdoc settings</h1>\

Comment on lines 368 to 370
"<h1 class=\"fqn\">\
<span class=\"in-band\">List of all items</span>\
List of all items\
</h1>",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here:

Suggested change
"<h1 class=\"fqn\">\
<span class=\"in-band\">List of all items</span>\
List of all items\
</h1>",
"<h1 class=\"fqn\">List of all items</h1>",

@@ -518,7 +518,7 @@ if (typeof exports !== 'undefined') {exports.searchIndex = searchIndex};

let content = format!(
"<h1 class=\"fqn\">\
<span class=\"in-band\">List of all crates</span>\
List of all crates\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

/* Then override it with `anywhere`, which is required to make non-Safari browsers break
more aggressively when we want them to. */
overflow-wrap: anywhere;
background-color: var(--main-background-color);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more background?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not needed. The fqn is always right on top of a regular background of the same color anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just confirmed it. 👍

@GuillaumeGomez
Copy link
Member

Do you have an online by any chance? I'd love to be able to take a look at the result.

@notriddle
Copy link
Contributor Author

@GuillaumeGomez
Copy link
Member

Apart the small nits, looks all good to me. r=me once they're fixed.

@rust-log-analyzer

This comment has been minimized.

@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Oct 4, 2022

📌 Commit f7a1d695612d33680ec62273266c9d6a664f00e8 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 4, 2022
@bors
Copy link
Contributor

bors commented Oct 5, 2022

☔ The latest upstream changes (presumably #102691) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 5, 2022
@notriddle
Copy link
Contributor Author

@bors r=GuillaumeGomez rollup

@bors
Copy link
Contributor

bors commented Oct 6, 2022

📌 Commit 3cb03cb has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 6, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 6, 2022
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#102672 (rustdoc: remove unused CSS class `in-band`)
 - rust-lang#102693 (Revert "Use getentropy when possible on all Apple platforms")
 - rust-lang#102694 (Suggest calling method if fn does not exist)
 - rust-lang#102708 (Suggest `==` to wrong assign expr)
 - rust-lang#102710 (Add test for issue 82633)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5f5b7b8 into rust-lang:master Oct 6, 2022
@rustbot rustbot added this to the 1.66.0 milestone Oct 6, 2022
@notriddle notriddle deleted the notriddle/fqn-in-band branch October 6, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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