-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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: short descriptions cause word-breaks in tables #128023
Conversation
The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. Signed-off-by: René Kijewski <rene.kijewski@fu-berlin.de>
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @notriddle (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 (
|
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
Makes sense. @bors r+ |
rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#126450 (Promote Mac Catalyst targets to Tier 2, and ship with rustup) - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) r? `@ghost` `@rustbot` modify labels: rollup
rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
Nice thanks! I'll add a regression test for it once merged. |
rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
…llaumeGomez Rollup of 7 pull requests Successful merges: - rust-lang#126450 (Promote Mac Catalyst targets to Tier 2, and ship with rustup) - rust-lang#127177 (Distribute rustc_codegen_cranelift for arm64 macOS) - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#127985 (Migrate `test-benches`, `c-unwind-abi-catch-panic` and `compiler-lookup-paths-2` `run-make` tests to rmake) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) r? `@ghost` `@rustbot` modify labels: rollup
rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128020 (Just totally fully deny late-bound consts) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) - rust-lang#128033 (Explain why we require `_` for empty patterns) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#127510 (Rewrite `test-float-parse` in Rust) - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#127977 (Update wasi-sdk in CI to latest release) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128020 (Just totally fully deny late-bound consts) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) - rust-lang#128033 (Explain why we require `_` for empty patterns) r? `@ghost` `@rustbot` modify labels: rollup
You're welcome! Can you Cc me when you do, please? I didn't know how to add such a test, and maybe I can learn and borrow the knowledge for the next PR or some other project. :) |
@bors rollup=always |
…kingjubilee Rollup of 6 pull requests Successful merges: - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`) - rust-lang#128014 (Fix stab display in doc blocks) - rust-lang#128020 (Just totally fully deny late-bound consts) - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables) - rust-lang#128033 (Explain why we require `_` for empty patterns) - rust-lang#128038 (Don't output incremental test artifacts into working directory) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128023 - Kijewski:pr-table-width, r=notriddle rustdoc: short descriptions cause word-breaks in tables The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word. This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive. See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases). [![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2) The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
…notriddle Add regression test for items list size (rust-lang#128023) Add missing regression test for rust-lang#128023. cc `@Kijewski` (if you want more information about the framework used, documentation is available [here](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md)). r? `@notriddle`
Rollup of 9 pull requests Successful merges: - rust-lang#117932 (Correct rustdoc section where we talk about rustdoc emitting errors on invalid code) - rust-lang#125990 (Rename `deprecated_safe` lint to `deprecated_safe_2024`) - rust-lang#127506 (rustc_target: add known safe s390x target features) - rust-lang#127820 (Rewrite and rename `issue-14698`. `issue-33329` and `issue-107094` `run-make` tests to rmake or ui) - rust-lang#127923 (Use reuse tool 4.0) - rust-lang#128008 (Start using `#[diagnostic::do_not_recommend]` in the standard library) - rust-lang#128036 (add more tests) - rust-lang#128051 (rustdoc: revert spacing change in item-table) - rust-lang#128059 (Add regression test for items list size (rust-lang#128023)) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#128059 - GuillaumeGomez:test-for-128023, r=notriddle Add regression test for items list size (rust-lang#128023) Add missing regression test for rust-lang#128023. cc `@Kijewski` (if you want more information about the framework used, documentation is available [here](https://github.com/GuillaumeGomez/browser-UI-test/blob/master/goml-script.md)). r? `@notriddle`
The
.item-table
class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word.This change makes the table always use 100% of its parent width. The
.width-limiter
wrapper already ensures that the used width still does not become excessive.See e.g. https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html or https://docs.rs/cw-events/0.0.9/cw_events/ (random choices out of the list of the recent releases).
The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.