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: clean up line numbers on code examples #102118

Merged
merged 3 commits into from
Sep 23, 2022

Conversation

notriddle
Copy link
Contributor

@notriddle notriddle commented Sep 21, 2022

  • First commit switches from display: inline-flex; width: 100% to display: flex.

    display: inline-flex was used as part of e961d39, the original commit that added these line numbers. Does anyone know why it was done this way?

  • Second commit makes it so that toggling this checkbox will update the page in real time, just like changing themes does.

Preview: https://notriddle.com/notriddle-rustdoc-test/line-numbers/std/vec/struct.Vec.html

`display: inline-flex` was used as part of
e961d39, the original commit that added
these line numbers. Does anyone know why it was done this way?
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 21, 2022
@rustbot
Copy link
Collaborator

rustbot commented Sep 21, 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 @CraftSpider (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 Sep 21, 2022
@notriddle notriddle force-pushed the notriddle/line-numbers branch from df39b76 to f66769f Compare September 21, 2022 23:11
@@ -10,7 +10,7 @@ assert-property: ("html", {"scrollTop": "0"})
click: '//a[text() = "barbar"]'
assert-property: ("html", {"scrollTop": "125"})
click: '//a[text() = "bar"]'
assert-property: ("html", {"scrollTop": "166"})
assert-property: ("html", {"scrollTop": "156"})
Copy link
Member

Choose a reason for hiding this comment

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

Why did this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Line wrapping changed because of the slightly wider header box.

Copy link
Member

Choose a reason for hiding this comment

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

Well I guess it's a good thing then!

@GuillaumeGomez
Copy link
Member

Apart from my question, it looks great!

@GuillaumeGomez
Copy link
Member

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 22, 2022

📌 Commit 8b4c0d9 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 Sep 22, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 23, 2022
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#102113 (OpTy: fix a method taking self rather than &self)
 - rust-lang#102118 (rustdoc: clean up line numbers on code examples)
 - rust-lang#102123 (Add note to clippy::non_expressive_names doc)
 - rust-lang#102125 (rustdoc: remove no-op CSS `.content .item-info { position: relative }`)
 - rust-lang#102127 (Use appropriate variable names)
 - rust-lang#102128 (Const unification is already infallible, remove the error handling logic)
 - rust-lang#102133 (Use valtrees for comparison)
 - rust-lang#102135 (Improve some AllTypes fields name)
 - rust-lang#102144 (Extend const_convert with const {FormResidual, Try} for ControlFlow.)
 - rust-lang#102147 (rustdoc: remove no-op CSS `.location:empty { border: none }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ecbc00f into rust-lang:master Sep 23, 2022
@rustbot rustbot added this to the 1.66.0 milestone Sep 23, 2022
@notriddle notriddle deleted the notriddle/line-numbers branch September 23, 2022 15:22
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.

6 participants