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

Regression in rustdoc output #131223

Closed
joshlf opened this issue Oct 4, 2024 · 5 comments · Fixed by #131257
Closed

Regression in rustdoc output #131223

joshlf opened this issue Oct 4, 2024 · 5 comments · Fixed by #131257
Labels
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-discussion Category: Discussion or questions that doesn't represent real issues. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Comments

@joshlf
Copy link
Contributor

joshlf commented Oct 4, 2024

I tried this code: https://github.com/google/zerocopy/tree/52e91319e144bf91a86b688b770d5d4e3735d9d4

I ran the following commands:

$ cargo +nightly-2024-10-01 doc
$ cargo +nightly-2024-10-02 doc
On 2024-10-01, this renders like this

Image

On 2024-10-02, this renders like this

Image

Note that the bullet points are spaced farther apart. I'm assuming this is a regression?

@joshlf joshlf added the C-bug Category: This is a bug. label Oct 4, 2024
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Oct 4, 2024
@jieyouxu jieyouxu added A-rustdoc-ui Area: Rustdoc UI (generated HTML) T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Oct 4, 2024
@jieyouxu
Copy link
Member

jieyouxu commented Oct 4, 2024

Note that the bullet points are spaced farther apart. I'm assuming this is a regression?

I think this is a consequence of #130933 which was intended to address #130622. GG is adding a UI regression test for the spacing in #131209 for #130622. cc @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

It's indeed something that we changed on purpose.

@jieyouxu jieyouxu added C-discussion Category: Discussion or questions that doesn't represent real issues. and removed C-bug Category: This is a bug. needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Oct 4, 2024
@GuillaumeGomez
Copy link
Member

Little modification: the changes are improving the situation but introducing some new other issues. Talking about it currently to figure out what's the best solution.

@GuillaumeGomez
Copy link
Member

I opened #131257. Please don't hesitate to take a look. Hopefully I was able to improve the current situation without going back to the original issue.

@joshlf
Copy link
Contributor Author

joshlf commented Oct 4, 2024

I opened #131257. Please don't hesitate to take a look. Hopefully I was able to improve the current situation without going back to the original issue.

Certainly seems better than before!

workingjubilee added a commit to workingjubilee/rustc that referenced this issue 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`
@bors bors closed this as completed in 869b8eb Oct 5, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this issue 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
A-rustdoc-ui Area: Rustdoc UI (generated HTML) C-discussion Category: Discussion or questions that doesn't represent real issues. 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 a pull request may close this issue.

4 participants