Skip to content

rustdoc: make settings checkboxes always square #139282

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged

Conversation

lolbinarycat
Copy link
Contributor

Previously, checkboxes would flex horizontally on small screens:
Screenshot 2025-04-02 at 15-45-13 std - Rust

this simple css tweak fixes this.

@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2025

r? @notriddle

rustbot has assigned @notriddle.
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 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. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Apr 2, 2025
@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2025

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@notriddle
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 3, 2025

📌 Commit 33c1ff0 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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 3, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139080 (Experimental feature gate for `super let`)
 - rust-lang#139145 (slice: Remove some uses of unsafe in first/last chunk methods)
 - rust-lang#139149 (unstable book: document import_trait_associated_functions)
 - rust-lang#139273 (Apply requested API changes to `cell_update`)
 - rust-lang#139282 (rustdoc: make settings checkboxes always square)
 - rust-lang#139283 (Rustc dev guide subtree update)
 - rust-lang#139294 (Fix the `f16`/`f128` feature gates on integer literals)

r? `@ghost`
`@rustbot` modify labels: rollup
@GuillaumeGomez
Copy link
Member

Looks good to me as well, thanks! Please add a GUI test too. :)

@bors r-

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 3, 2025
@GuillaumeGomez
Copy link
Member

Ah, it's already in a rollup...

bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139080 (Experimental feature gate for `super let`)
 - rust-lang#139145 (slice: Remove some uses of unsafe in first/last chunk methods)
 - rust-lang#139149 (unstable book: document import_trait_associated_functions)
 - rust-lang#139273 (Apply requested API changes to `cell_update`)
 - rust-lang#139282 (rustdoc: make settings checkboxes always square)
 - rust-lang#139283 (Rustc dev guide subtree update)
 - rust-lang#139294 (Fix the `f16`/`f128` feature gates on integer literals)

r? `@ghost`
`@rustbot` modify labels: rollup
@lolbinarycat
Copy link
Contributor Author

@GuillaumeGomez how do i add a gui test for layout properties?

i don't think we have a guide for writing gui tests, do we?

@GuillaumeGomez
Copy link
Member

There is a README.md file in tests/rustdoc-gui, but I can help you here:

  • First, store the size of the checkbox being reduced using the store-size command.
  • Then use the set-window-size command to reduce the window's size to where the bug can be triggered.
  • Then check that the size of the checkbox didn't change using the assert-size command.

And that's it! To run the GUI tests, use x.py test tests/rustdoc-gui. Normally it'll tell you that you need to install the browser-ui-test package with the command to use so should be pretty straightforward. Don't hesitate if you encounter an issue.

@bors bors merged commit b5d5b6c into rust-lang:master Apr 3, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 3, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 3, 2025
Rollup merge of rust-lang#139282 - lolbinarycat:rustdoc-settings-checkbox-noshrink, r=notriddle

rustdoc: make settings checkboxes always square

Previously, checkboxes would flex horizontally on small screens:
![Screenshot 2025-04-02 at 15-45-13 std - Rust](https://github.com/user-attachments/assets/405dc764-3c04-4ba4-b86c-19e9d4fc0bff)

this simple css tweak fixes this.
@@ -1446,6 +1446,9 @@ so that we can apply CSS-filters to change the arrow color in themes */
align-items: center;
cursor: pointer;
}
.setting-check input {
flex-shrink: 0,
Copy link
Member

Choose a reason for hiding this comment

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

Ah right, it was invalid CSS: it's supposed to be a colon and not a comma. Hence why it's important to add GUI test.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Apr 7, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 8, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#139080 (Experimental feature gate for `super let`)
 - rust-lang#139145 (slice: Remove some uses of unsafe in first/last chunk methods)
 - rust-lang#139149 (unstable book: document import_trait_associated_functions)
 - rust-lang#139273 (Apply requested API changes to `cell_update`)
 - rust-lang#139282 (rustdoc: make settings checkboxes always square)
 - rust-lang#139283 (Rustc dev guide subtree update)
 - rust-lang#139294 (Fix the `f16`/`f128` feature gates on integer literals)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Apr 9, 2025
…t, r=camelid

Add missing regression GUI test

Add missing GUI test for rust-lang#139282 (and also fixes the invalid CSS).

cc `@lolbinarycat`
r? `@notriddle`
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Apr 10, 2025
Rollup merge of rust-lang#139488 - GuillaumeGomez:add-missing-gui-test, r=camelid

Add missing regression GUI test

Add missing GUI test for rust-lang#139282 (and also fixes the invalid CSS).

cc `@lolbinarycat`
r? `@notriddle`
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. 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