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

rustdoc: animate the :target highlight #129284

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

notriddle
Copy link
Contributor

This approach is, roughly, based on how Discourse does it. It came up while discussing some other possible sidebar changes, as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

Screencast.from.2024-08-19.16-35-40.mp4

@notriddle notriddle added the T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. label Aug 19, 2024
@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2024

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot
Copy link
Collaborator

rustbot commented Aug 19, 2024

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 19, 2024
@rust-log-analyzer

This comment has been minimized.

This approach is, roughly, based on how Discourse does it.
It came up while discussing some other possible sidebar changes,
as a design that made rapid scanning easier while avoiding the
inherent trade-offs in summarizing.
@notriddle notriddle force-pushed the notriddle/animate-target=light branch from 3559a7f to 9d7574f Compare August 20, 2024 01:14
@rustbot
Copy link
Collaborator

rustbot commented Aug 20, 2024

Some changes occurred in GUI tests.

cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Nice improvement!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 20, 2024

📌 Commit 9d7574f has been approved by GuillaumeGomez

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Aug 20, 2024
…=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 20, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#127623 (fix: fs::remove_dir_all: treat internal ENOENT as success)
 - rust-lang#128627 (Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms.)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129190 (Added f16 and f128 to tests/ui/consts/const-float-bits-conv.rs)
 - rust-lang#129231 (improve submodule updates)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 20, 2024
Rollup of 6 pull requests

Successful merges:

 - rust-lang#127623 (fix: fs::remove_dir_all: treat internal ENOENT as success)
 - rust-lang#128627 (Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms.)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129190 (Added f16 and f128 to tests/ui/consts/const-float-bits-conv.rs)
 - rust-lang#129231 (improve submodule updates)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)

r? `@ghost`
`@rustbot` modify labels: rollup
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 21, 2024
…=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 21, 2024
…=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
tgross35 added a commit to tgross35/rust that referenced this pull request Aug 21, 2024
…=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 21, 2024
Rollup of 7 pull requests

Successful merges:

 - rust-lang#128432 (WASI: forbid `unsafe_op_in_unsafe_fn` for `std::{os, sys}`)
 - rust-lang#128627 (Special case DUMMY_SP to emit line 0/column 0 locations on DWARF platforms.)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129257 (Allow rust staticlib to work with MSVC's /WHOLEARCHIVE)
 - rust-lang#129264 (Update `library/Cargo.toml` in weekly job)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)
 - rust-lang#129332 (Avoid extra `cast()`s after `CStr::as_ptr()`)

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

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127279 (use old ctx if has same expand environment during decode span)
 - rust-lang#127945 (Implement `debug_more_non_exhaustive`)
 - rust-lang#128941 ( Improve diagnostic-related lints: `untranslatable_diagnostic` & `diagnostic_outside_of_impl`)
 - rust-lang#129070 (Point at explicit `'static` obligations on a trait)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129231 (improve submodule updates)
 - rust-lang#129264 (Update `library/Cargo.toml` in weekly job)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)
 - rust-lang#129302 (compiletest: use `std::fs::remove_dir_all` now that it is available)

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

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127279 (use old ctx if has same expand environment during decode span)
 - rust-lang#127945 (Implement `debug_more_non_exhaustive`)
 - rust-lang#128941 ( Improve diagnostic-related lints: `untranslatable_diagnostic` & `diagnostic_outside_of_impl`)
 - rust-lang#129070 (Point at explicit `'static` obligations on a trait)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129231 (improve submodule updates)
 - rust-lang#129264 (Update `library/Cargo.toml` in weekly job)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)
 - rust-lang#129302 (compiletest: use `std::fs::remove_dir_all` now that it is available)

r? `@ghost`
`@rustbot` modify labels: rollup
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Aug 22, 2024
…=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2024
…iaskrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#127279 (use old ctx if has same expand environment during decode span)
 - rust-lang#127945 (Implement `debug_more_non_exhaustive`)
 - rust-lang#128941 ( Improve diagnostic-related lints: `untranslatable_diagnostic` & `diagnostic_outside_of_impl`)
 - rust-lang#129070 (Point at explicit `'static` obligations on a trait)
 - rust-lang#129187 (bootstrap: fix clean's remove_dir_all implementation)
 - rust-lang#129231 (improve submodule updates)
 - rust-lang#129264 (Update `library/Cargo.toml` in weekly job)
 - rust-lang#129284 (rustdoc: animate the `:target` highlight)
 - rust-lang#129302 (compiletest: use `std::fs::remove_dir_all` now that it is available)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ade3325 into rust-lang:master Aug 22, 2024
6 checks passed
@rustbot rustbot added this to the 1.82.0 milestone Aug 22, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Aug 22, 2024
Rollup merge of rust-lang#129284 - notriddle:notriddle/animate-target=light, r=GuillaumeGomez

rustdoc: animate the `:target` highlight

This approach is, roughly, based on how Discourse does it. It came up while discussing [some other possible sidebar changes](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Moving.20deprecated.20items.20out.20of.20the.20way), as a design that made rapid scanning easier while avoiding the inherent trade-offs in summarizing.

https://github.com/user-attachments/assets/f7a8fec3-70a5-40a1-92ea-bfdffbd61c22
@notriddle notriddle deleted the notriddle/animate-target=light branch August 22, 2024 14:27
zopsicle added a commit to zopsicle/rust that referenced this pull request Sep 25, 2024
This gates rust-lang#129284 behind prefers-reduced-motion media query.
zopsicle added a commit to zopsicle/rust that referenced this pull request Sep 25, 2024
This gates rust-lang#129284 behind an inverted prefers-reduced-motion media query.
zopsicle added a commit to zopsicle/rust that referenced this pull request Sep 25, 2024
This accessibility improvement gates rust-lang#129284 behind an inverted
prefers-reduced-motion media query.
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 26, 2024
…laumeGomez

rustdoc: do not animate :target when user prefers reduced motion

This accessibility improvement gates rust-lang#129284 behind an inverted [prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/`@media/prefers-reduced-motion)` media query.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Sep 27, 2024
Rollup merge of rust-lang#130862 - zopsicle:patch-1, r=notriddle,GuillaumeGomez

rustdoc: do not animate :target when user prefers reduced motion

This accessibility improvement gates rust-lang#129284 behind an inverted [prefers-reduced-motion](https://developer.mozilla.org/en-US/docs/Web/CSS/`@media/prefers-reduced-motion)` media query.
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-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants