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

Fix copy path button #124041

Merged
merged 2 commits into from
Apr 18, 2024
Merged

Conversation

GuillaumeGomez
Copy link
Member

Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in #123706 forgot to update the JS (it contained an image before but not anymore).

I had to make some small changes in the CSS to fix the display when the button was clicked as well.

r? @notriddle

@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2024

Could not assign reviewer from: notriddle.
User(s) notriddle are either the PR author, already assigned, or on vacation. If it's a team, we could not find any candidates.
Please use r? to specify someone else to assign.

@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2024

@GuillaumeGomez: no appropriate reviewer found, use r? to override

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Apr 16, 2024
@rustbot
Copy link
Collaborator

rustbot commented Apr 16, 2024

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rust-log-analyzer

This comment has been minimized.


#copy-path:before {
#copy-path.clicked {
font-size: 26px;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems pretty fragile. It's dependent on font metrics to avoid making the button jump around, so you can easily mess it up and get layout jank.

Instead of using a text checkmark, could you use the SVG checkmark? That way, the .clicked class can change the content: url and nothing else, so it's obvious that it won't change the layout?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's what I did originally but the checkmark svg is pretty ugly in this context. I'll look for another one instead.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 16, 2024
@GuillaumeGomez
Copy link
Member Author

Changed the checkmark to svg. The CSS is much simpler now. :)

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 17, 2024

📌 Commit 1ebc9ef has been approved by notriddle

It is now in the queue for this repository.

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 17, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 18, 2024
…n, r=notriddle

Fix copy path button

Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in rust-lang#123706 forgot to update the JS (it contained an image before but not anymore).

I had to make some small changes in the CSS to fix the display when the button was clicked as well.

r? `@notriddle`
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#124041 (Fix copy path button)
 - rust-lang#124047 (Match ergonomics 2024: miscellaneous code cleanups)
 - rust-lang#124064 (Move confusing comment about otherwise blocks in `lower_match_tree`)
 - rust-lang#124072 (Remove libc from more tests)
 - rust-lang#124090 (llvm: update riscv target feature to match LLVM 19)
 - rust-lang#124100 (fix: make `str::from_raw_parts_mut` `mut`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2024
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#124041 (Fix copy path button)
 - rust-lang#124047 (Match ergonomics 2024: miscellaneous code cleanups)
 - rust-lang#124064 (Move confusing comment about otherwise blocks in `lower_match_tree`)
 - rust-lang#124090 (llvm: update riscv target feature to match LLVM 19)
 - rust-lang#124100 (fix: make `str::from_raw_parts_mut` `mut`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 56f4ac3 into rust-lang:master Apr 18, 2024
12 checks passed
@rustbot rustbot added this to the 1.79.0 milestone Apr 18, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 18, 2024
Rollup merge of rust-lang#124041 - GuillaumeGomez:fix-copy-path-button, r=notriddle

Fix copy path button

Currently, on all nightly docs, clicking on the "copy path" button triggers a JS error. It's because changes in rust-lang#123706 forgot to update the JS (it contained an image before but not anymore).

I had to make some small changes in the CSS to fix the display when the button was clicked as well.

r? ``@notriddle``
@GuillaumeGomez GuillaumeGomez deleted the fix-copy-path-button branch April 18, 2024 11:00
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.

5 participants