Uh oh!
There was an error while loading. Please reload this page.
rustdoc: simplify the codeblock tooltip - #101600
Merged
Merged
Conversation
rust-highfive
commented
Sep 9, 2022
Contributor
r? @jsha (rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
notriddleforce-pushed
the
notriddle/li
branch
2 times, most recently
from
September 9, 2022 03:12
24e1a38 to
d734633Compare
This comment has been minimized.
This comment has been minimized.
notriddle
commented
Sep 9, 2022
ContributorAuthor
notriddle
marked this pull request as ready for review
September 9, 2022 12:50
rustbot
commented
Sep 9, 2022
Collaborator
A change occurred in the Ayu theme. cc @Cldfire Some changes occurred in HTML/CSS themes. Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @Folyd, @jsha |
GuillaumeGomez
commented
Sep 9, 2022
Member
Please rebase. Also I was about to work on simplifying the tooltips but differently. I think this PR and mine will be complementary. Interesting how things turn up. |
This commit moves the tooltip into example-wrap, simplifying allowing several overly-complex things to be fixed: * The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside. * The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself. * The relative positioning of the `<li>` tag, which was added in e861efd to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
notriddle
commented
Sep 9, 2022
ContributorAuthor
@GuillaumeGomez okay, it’s rebased |
GuillaumeGomez
approved these changes
Sep 9, 2022
GuillaumeGomez
commented
Sep 9, 2022
Member
Looks good to me, thanks! r=me once CI pass |
GuillaumeGomez
commented
Sep 9, 2022
Member
@bors r+ rollup |
bors
commented
Sep 9, 2022
Collaborator
This was referenced Sep 9, 2022
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 9, 2022
…llaumeGomez Rollup of 5 pull requests Successful merges: - rust-lang#101475 (Use futex-based locks and thread parker on Hermit) - rust-lang#101492 (Suggest adding array lengths to references to arrays if possible) - rust-lang#101495 (Compile spin_loop_hint as pause on x86 even without sse2 enabled) - rust-lang#101529 (Fix the example code and doctest for Formatter::sign_plus) - rust-lang#101600 (rustdoc: simplify the codeblock tooltip) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
compiler-errors added a commit
to compiler-errors/rust
that referenced
this pull request
Sep 10, 2022
…r=notriddle Simplify codeblock and their associated tooltip It is based on rust-lang#101600 so it needs to wait for this one to be merged first. This PR does two things: * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip. * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it. You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref). r? `@notriddle`
bors added a commit
to rust-lang-ci/rust
that referenced
this pull request
Sep 10, 2022
…notriddle Simplify codeblock and their associated tooltip It is based on rust-lang#101600 so it needs to wait for this one to be merged first. This PR does two things: * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip. * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it. You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref). r? `@notriddle`
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR moves the tooltip into example-wrap, simplifying several overly-complex aspects of how these tooltips work:
<li>tag, which was added in e861efd to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.