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

Line numbers aligned with content #86542

Merged

Conversation

GuillaumeGomez
Copy link
Member

We had the issue a few times in the past where the source code pages' content wasn't aligned with the line numbers but completely below. This test will prevent this change to go unnoticed.

The first commit comes from #86541 so it needs it to be merged first.

r? @jsha

@GuillaumeGomez GuillaumeGomez added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jun 22, 2021
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 22, 2021
Comment on lines +14 to +15
// This is to ensure that the content is correctly align with the line numbers.
compare-elements-position: ("//*[@id='1']", ".rust > span", ("y"))
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't hurt, but I also don't think it helps very much? Usually the isuses come from less common browsers because the line numbers use a metric ton of CSS to allow being out-of-line with the code itself.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not at all. The issue appeared at least three times on all browsers. There were the line numbers and then completely below the source code. It was caused by changes on the CSS as you may have guessed. ;)

@jyn514
Copy link
Member

jyn514 commented Jun 22, 2021

r=me if you're ok with closing #86541 and merging it as part of this one

@GuillaumeGomez
Copy link
Member Author

Sounds good to me. Thanks for the quick review!

@bors: r=jyn514

@bors
Copy link
Contributor

bors commented Jun 22, 2021

📌 Commit 5c9e10e has been approved by jyn514

@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 Jun 22, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 22, 2021
Rollup of 6 pull requests

Successful merges:

 - rust-lang#86223 (Specify the kind of the item for E0121)
 - rust-lang#86521 (Add comments around code where ordering is important due for panic-safety)
 - rust-lang#86523 (Improvements to intra-doc link macro disambiguators)
 - rust-lang#86542 (Line numbers aligned with content)
 - rust-lang#86549 (Add destructuring example of E0508)
 - rust-lang#86557 (Update books)

Failed merges:

 - rust-lang#86548 (Fix crate filter search reset)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit f19aad8 into rust-lang:master Jun 23, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 23, 2021
@GuillaumeGomez GuillaumeGomez deleted the line-numbers-aligned-with-content branch June 23, 2021 08:07
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 23, 2021
…h-reset, r=jsha

Fix crate filter search reset

I found a fun bug when using rustdoc recently: I made a search, cut the search input content, changed the crate filter, pasted back the input content. To my surprise, the crate filter wasn't applied. It's because that our search input was empty when receiving the `<select>` "onchange" event. To fix this issue, I reset the `currentResults` variable to `null`.

It's using the first commit from rust-lang#86542 so it needs to wait for it before getting merged.

r? `@jsha`
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