-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
bors
merged 2 commits into
rust-lang:master
from
GuillaumeGomez:line-numbers-aligned-with-content
Jun 23, 2021
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
// This test ensures that the element corresponding to the hash is displayed. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html#method.borrow | ||
// In the blanket implementations list, "Borrow" is the second one, hence the ":nth(2)". | ||
assert-attr: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""}) | ||
assert-attribute: ("#blanket-implementations-list > details:nth-child(2)", {"open": ""}) | ||
// We first check that the impl block is open by default. | ||
assert-attr: ("#implementations + details", {"open": ""}) | ||
assert-attribute: ("#implementations + details", {"open": ""}) | ||
// We collapse it. | ||
click: "#implementations + details > summary" | ||
// We check that it was collapsed as expected. | ||
assert-attr-false: ("#implementations + details", {"open": ""}) | ||
assert-attribute-false: ("#implementations + details", {"open": ""}) | ||
// To ensure that we will click on the currently hidden method. | ||
assert-text: (".sidebar-links > a", "must_use") | ||
click: ".sidebar-links > a" | ||
// We check that the impl block was opened as expected so that we can see the method. | ||
assert-attr: ("#implementations + details", {"open": ""}) | ||
assert-attribute: ("#implementations + details", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// This test ensures that the impl blocks are open by default. | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
assert-attr: ("#main > details.implementors-toggle", {"open": ""}) | ||
assert-attribute: ("#main > details.implementors-toggle", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
goto: file://|DOC_PATH|/test_docs/struct.Foo.html | ||
size: (433, 600) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
click: (4, 280) // This is the position of the top doc comment toggle | ||
assert-attr-false: (".top-doc", {"open": ""}) | ||
assert-attribute-false: (".top-doc", {"open": ""}) | ||
click: (4, 280) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. | ||
click: (3, 280) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
|
||
// Now we do the same but with a little bigger width | ||
size: (600, 600) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
click: (4, 240) // New Y position since all search elements are back on one line. | ||
assert-attr-false: (".top-doc", {"open": ""}) | ||
assert-attribute-false: (".top-doc", {"open": ""}) | ||
click: (4, 240) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) | ||
// To ensure that the toggle isn't over the text, we check that the toggle isn't clicked. | ||
click: (3, 240) | ||
assert-attr: (".top-doc", {"open": ""}) | ||
assert-attribute: (".top-doc", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
goto: file://|DOC_PATH|/test_docs/index.html | ||
assert-attr: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute: ("#main > details.top-doc", {"open": ""}) | ||
click: "#toggle-all-docs" | ||
wait-for: 1000 | ||
// This is now collapsed so there shouldn't be the "open" attribute on details. | ||
assert-attr-false: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute-false: ("#main > details.top-doc", {"open": ""}) | ||
click: "#toggle-all-docs" | ||
wait-for: 1000 | ||
// Not collapsed anymore so the "open" attribute should be back. | ||
assert-attr: ("#main > details.top-doc", {"open": ""}) | ||
assert-attribute: ("#main > details.top-doc", {"open": ""}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. ;)