-
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
Always display first line of impl blocks even when collapsed #132155
Merged
+242
−58
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
fad5f51
Always display first line of impl blocks even when collapsed
GuillaumeGomez 32e6826
Update browser-ui-test version to 0.18.2
GuillaumeGomez 5d26acc
Add GUI test for impl block doc display
GuillaumeGomez abcd094
Update GUI tests
GuillaumeGomez 6e0dabd
Turn `markdown_split_summary_and_content` into a method of `Markdown`
GuillaumeGomez 448d9ad
Use text ellipsis instead of bottom blurring
GuillaumeGomez 90feb9a
Improve positioning of "..." in collapsed impl block
GuillaumeGomez 854ebe7
Update GUI test after rebase
GuillaumeGomez 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
2 changes: 1 addition & 1 deletion
2
src/ci/docker/host-x86_64/x86_64-gnu-tools/browser-ui-test.version
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 +1 @@ | ||
0.18.1 | ||
0.18.2 |
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
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Checks that the first sentence of an impl block doc is always visible even when the impl | ||
// block is collapsed. | ||
go-to: "file://" + |DOC_PATH| + "/test_docs/struct.ImplDoc.html" | ||
|
||
set-window-size: (900, 600) | ||
|
||
define-function: ( | ||
"compare-size-and-pos", | ||
[nth_impl], | ||
block { | ||
// First we collapse the impl block. | ||
store-value: (impl_path, "#implementations-list details:nth-of-type(" + |nth_impl| + ")") | ||
set-property: (|impl_path|, {"open": false}) | ||
wait-for: |impl_path| + ":not([open])" | ||
|
||
store-value: (impl_path, |impl_path| + " summary") | ||
store-size: (|impl_path|, {"height": impl_height}) | ||
store-position: (|impl_path|, {"y": impl_y}) | ||
|
||
store-size: (|impl_path| + " .docblock", {"height": doc_height}) | ||
store-position: (|impl_path| + " .docblock", {"y": doc_y}) | ||
|
||
assert: |impl_y| + |impl_height| >= |doc_y| | ||
} | ||
) | ||
|
||
call-function: ("compare-size-and-pos", {"nth_impl": 1}) | ||
// Since the first impl block has a long line, we ensure that it doesn't display all of it. | ||
assert: (|impl_y| + |impl_height|) <= (|doc_y| + |doc_height|) | ||
|
||
call-function: ("compare-size-and-pos", {"nth_impl": 2}) | ||
// The second impl block has a short line. | ||
assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|) | ||
|
||
// FIXME: Needs `if` condition to make this test check that `padding-top` on the "..." element | ||
// is as expected for tables. | ||
call-function: ("compare-size-and-pos", {"nth_impl": 3}) | ||
assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|) | ||
call-function: ("compare-size-and-pos", {"nth_impl": 4}) | ||
assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|) | ||
call-function: ("compare-size-and-pos", {"nth_impl": 5}) | ||
assert: (|impl_y| + |impl_height|) >= (|doc_y| + |doc_height|) |
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
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
Oops, something went wrong.
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.
Changes in this test are because of the table added in the docs.