Skip to content

Rollup of 9 pull requests #129993

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

Closed
wants to merge 47 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
7627a54
Call the target libdir target libdir
Noratrieb Jun 7, 2024
27f92b6
fix: get llvm type of global val
LYF1999 Aug 8, 2024
c6111c0
Remove the `'body` lifetime on `FilterInformation`.
nnethercote Aug 29, 2024
0a282ea
Move `WriteInfo` out of `Allocations`.
nnethercote Aug 29, 2024
ad5a6e1
Remove `Allocations`.
nnethercote Aug 29, 2024
1be2204
Simplify `Candidate`.
nnethercote Aug 29, 2024
0d156f2
Unify scraped examples with other code examples
GuillaumeGomez Aug 30, 2024
5b75f8a
Update rustdoc GUI tests
GuillaumeGomez Aug 30, 2024
5afc461
Fix wrong rounded corners when line numbers are displayed on code exa…
GuillaumeGomez Aug 31, 2024
84259ff
Add GUI tests to ensure that rounded corners on code blocks are worki…
GuillaumeGomez Aug 31, 2024
35a7c1b
Fix position of scraped examples title on mobile devices
GuillaumeGomez Sep 1, 2024
dd5f7bc
Add GUI regression test for scraped examples title position on mobile
GuillaumeGomez Sep 1, 2024
4825fb1
Add missing CSS variables in GUI test for `custom-theme.css`
GuillaumeGomez Sep 1, 2024
5a85632
Correctly handle code examples buttons position
GuillaumeGomez Sep 1, 2024
01d8235
Fix scraped examples background gradient
GuillaumeGomez Sep 1, 2024
e3af6dc
Simplify CSS but wrapping scraped example into a div and move the tit…
GuillaumeGomez Sep 2, 2024
55bc638
Fix wrong padding for expanded scraped example
GuillaumeGomez Sep 2, 2024
65e78db
Elaborate on deriving vs implementing `Copy`
chancancode Sep 3, 2024
3626b66
Update marker.rs
chancancode Sep 3, 2024
efc20de
Update marker.rs
chancancode Sep 3, 2024
277a08c
Update marker.rs
chancancode Sep 3, 2024
e45b53e
Update marker.rs
chancancode Sep 3, 2024
7157f98
Fix square corners on line numbers when code is collapsed
GuillaumeGomez Sep 3, 2024
a4f2a31
Don't ICE when dumping MIR of a synthetic coroutine body
compiler-errors Aug 28, 2024
5525043
Rename dump of coroutine by-move-body to be more consistent, adjust test
compiler-errors Aug 28, 2024
8860008
Re-parent the by-move body
compiler-errors Aug 28, 2024
2031eac
run_make_support: rename `Command::stdin` to `stdin_buf` and add `std…
jieyouxu Sep 4, 2024
afed862
tests: use renamed `stdin_buf`
jieyouxu Sep 5, 2024
8871ce0
run_make_support: make each command invocation only-run-once
jieyouxu Sep 5, 2024
a459403
Sort impl associated items by kinds and then by appearance
GuillaumeGomez Aug 23, 2024
f96aff9
Add regression test for impl associated items sorting
GuillaumeGomez Aug 23, 2024
1884983
Make impl associated constants sorted first
GuillaumeGomez Aug 25, 2024
d059f37
Add missing sidebar associated items
GuillaumeGomez Aug 26, 2024
238944c
Add regression test for sidebar associated items
GuillaumeGomez Aug 26, 2024
8f9c4b3
Update to new rustdoc internal API
GuillaumeGomez Sep 5, 2024
f8f4d50
Don't worry about uncaptured contravariant lifetimes if they outlive …
compiler-errors Aug 12, 2024
7064135
Do less work on the good path
compiler-errors Aug 12, 2024
c1d0410
Review comments
compiler-errors Aug 19, 2024
b514f52
Rollup merge of #126136 - Noratrieb:bootstrap-naming, r=onur-ozkan
matthiaskrgr Sep 5, 2024
9039bcf
Rollup merge of #128820 - LYF1999:yf/dev, r=nikic
matthiaskrgr Sep 5, 2024
8f396e0
Rollup merge of #129028 - compiler-errors:contra, r=lcnr
matthiaskrgr Sep 5, 2024
36f4539
Rollup merge of #129471 - GuillaumeGomez:sort-impl-associated-items, …
matthiaskrgr Sep 5, 2024
41ce7a9
Rollup merge of #129706 - compiler-errors:scratch, r=estebank
matthiaskrgr Sep 5, 2024
e590201
Rollup merge of #129720 - nnethercote:simplify-dest_prop-mm, r=cjgillot
matthiaskrgr Sep 5, 2024
3f99c12
Rollup merge of #129796 - GuillaumeGomez:unify-code-examples, r=notri…
matthiaskrgr Sep 5, 2024
86bd866
Rollup merge of #129938 - chancancode:patch-1, r=thomcc
matthiaskrgr Sep 5, 2024
0be10be
Rollup merge of #129973 - jieyouxu:rework-rmake-stdio, r=Kobzol
matthiaskrgr Sep 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix wrong padding for expanded scraped example
  • Loading branch information
GuillaumeGomez committed Sep 2, 2024
commit 55bc638a1d3e5c19fcec3462bb8357dea6f7f56c
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -789,11 +789,18 @@ both the code example and the line numbers, so we need to remove the radius in t
}

.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers,
.rustdoc:not(.src) .scraped-example:not(.expanded) .src-line-numbers > pre,
.rustdoc:not(.src) .scraped-example:not(.expanded) pre.rust {
padding-bottom: 0;
/* See above comment, should be the same max-height. */
overflow: auto hidden;
}
.rustdoc:not(.src) .scraped-example .src-line-numbers {
padding-top: 0;
}
.rustdoc:not(.src) .scraped-example.expanded .src-line-numbers {
padding-bottom: 0;
}

.rustdoc:not(.src) .example-wrap pre {
overflow: auto;
Expand Down
4 changes: 2 additions & 2 deletions tests/rustdoc-gui/scrape-examples-button-focus.goml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ assert-property: (".scraped-example-list > .scraped-example .rust", {

// The expand button increases the scrollHeight of the minimized code viewport
store-property: (".scraped-example-list > .scraped-example pre", {"offsetHeight": smallOffsetHeight})
assert-property-false: (".scraped-example-list > .scraped-example .src-line-numbers", {
assert-property: (".scraped-example-list > .scraped-example .src-line-numbers", {
"scrollHeight": |smallOffsetHeight|
}, NEAR)
assert-property-false: (".scraped-example-list > .scraped-example .rust", {
assert-property: (".scraped-example-list > .scraped-example .rust", {
"scrollHeight": |smallOffsetHeight|
}, NEAR)
focus: ".scraped-example-list > .scraped-example .expand"
Expand Down
19 changes: 19 additions & 0 deletions tests/rustdoc-gui/scrape-examples-layout.goml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,25 @@ assert-position: (".scraped-example .scraped-example-title", {
"y": |y| + |height| - |title_height| - 8,
})

// Check that the expand button works and also that line number aligns with code.
move-cursor-to: ".scraped-example .rust"
click: ".scraped-example .button-holder .expand"
wait-for: ".scraped-example.expanded"
// They should have the same y position.
compare-elements-position: (
".scraped-example.expanded .src-line-numbers pre span",
".scraped-example.expanded .rust code",
["y"],
)
// And they should have the same height.
compare-elements-size: (
".scraped-example.expanded .src-line-numbers",
".scraped-example.expanded .rust",
["height"],
)
// Collapse code again.
click: ".scraped-example .button-holder .expand"

// Check that for both mobile and desktop sizes, the buttons in scraped examples are displayed
// correctly.

Expand Down
Loading