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: lists items that contain multiple paragraphs are more clear #130933

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

lolbinarycat
Copy link
Contributor

@lolbinarycat lolbinarycat commented Sep 27, 2024

fixes #130622

before: before

after:
after

@lolbinarycat lolbinarycat added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 27, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @GuillaumeGomez (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 27, 2024
@rustbot
Copy link
Collaborator

rustbot commented Sep 27, 2024

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @jsha

@GuillaumeGomez
Copy link
Member

Please add some before/after screenshots and also add GUI tests (don't hesitate to ask if you need help).

@lolbinarycat
Copy link
Contributor Author

before/after screenshots are available on #130761

@GuillaumeGomez
Copy link
Member

Time to put them here in the first message then.

@notriddle
Copy link
Contributor

@bors r=GuillaumeGomez,notriddle

@bors
Copy link
Contributor

bors commented Oct 1, 2024

📌 Commit 94a3f96 has been approved by GuillaumeGomez,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 Oct 1, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2024
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#130005 (Replace -Z default-hidden-visibility with -Z default-visibility)
 - rust-lang#130229 (ptr::add/sub: do not claim equivalence with `offset(c as isize)`)
 - rust-lang#130773 (Update Unicode escapes in `/library/core/src/char/methods.rs`)
 - rust-lang#130933 (rustdoc: lists items that contain multiple paragraphs are more clear)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit bd5ee83 into rust-lang:master Oct 1, 2024
6 checks passed
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2024
Rollup merge of rust-lang#130933 - lolbinarycat:rustdoc-li-p, r=GuillaumeGomez,notriddle

rustdoc: lists items that contain multiple paragraphs are more clear

fixes rust-lang#130622

before: ![before](https://github.com/user-attachments/assets/fe54d8ee-8a1a-45fc-9434-2737c5c6f4d5)

after:
![after](https://github.com/user-attachments/assets/095be365-1bfc-4001-8664-59bc4125bb05)
@rustbot rustbot added this to the 1.83.0 milestone Oct 1, 2024
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Oct 4, 2024
…=notriddle

[rustdoc] Fix list margins

Fixes rust-lang#131106.
Fixes rust-lang#131223.

Follow-up of  rust-lang#130933.

This PR changes the display as follow: the margin between list items is reduced by half to ensure that they visually still seem part of the same list, while also being bigger than previously which improves display for list items with more than one paragragh. Paragraphs also get they bottom margin reduced to a little bit less than the list items bottom margin for two reasons:
1. The list items keep having the biggest bottom margin which makes it better for coherency.
2. The paragraphs are still visually separated but they don't "overcome" the list.

| before | after |
|-|-|
| ![Screenshot from 2024-10-04 17-58-51](https://github.com/user-attachments/assets/3fdc1472-781e-435d-a0d7-012f43aa8fb8) | ![image](https://github.com/user-attachments/assets/0366313d-416f-4f04-b905-bb16c54f4528) |

Can be tested [here](https://rustdoc.crud.net/imperio/fix-list-margins/doc/test_docs/long_list/index.html).

r? `@notriddle`
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Oct 4, 2024
…=notriddle

[rustdoc] Fix list margins

Fixes rust-lang#131106.
Fixes rust-lang#131223.

Follow-up of  rust-lang#130933.

This PR changes the display as follow: the margin between list items is reduced by half to ensure that they visually still seem part of the same list, while also being bigger than previously which improves display for list items with more than one paragragh. Paragraphs also get they bottom margin reduced to a little bit less than the list items bottom margin for two reasons:
1. The list items keep having the biggest bottom margin which makes it better for coherency.
2. The paragraphs are still visually separated but they don't "overcome" the list.

| before | after |
|-|-|
| ![Screenshot from 2024-10-04 17-58-51](https://github.com/user-attachments/assets/3fdc1472-781e-435d-a0d7-012f43aa8fb8) | ![image](https://github.com/user-attachments/assets/0366313d-416f-4f04-b905-bb16c54f4528) |

Can be tested [here](https://rustdoc.crud.net/imperio/fix-list-margins/doc/test_docs/long_list/index.html).

r? ``@notriddle``
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Oct 5, 2024
Rollup merge of rust-lang#131257 - GuillaumeGomez:fix-list-margins, r=notriddle

[rustdoc] Fix list margins

Fixes rust-lang#131106.
Fixes rust-lang#131223.

Follow-up of  rust-lang#130933.

This PR changes the display as follow: the margin between list items is reduced by half to ensure that they visually still seem part of the same list, while also being bigger than previously which improves display for list items with more than one paragragh. Paragraphs also get they bottom margin reduced to a little bit less than the list items bottom margin for two reasons:
1. The list items keep having the biggest bottom margin which makes it better for coherency.
2. The paragraphs are still visually separated but they don't "overcome" the list.

| before | after |
|-|-|
| ![Screenshot from 2024-10-04 17-58-51](https://github.com/user-attachments/assets/3fdc1472-781e-435d-a0d7-012f43aa8fb8) | ![image](https://github.com/user-attachments/assets/0366313d-416f-4f04-b905-bb16c54f4528) |

Can be tested [here](https://rustdoc.crud.net/imperio/fix-list-margins/doc/test_docs/long_list/index.html).

r? ``@notriddle``
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.

rustdoc: improve legibility/spacing between multi-paragraph items
5 participants