-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Wrap too long type name #127418
Wrap too long type name #127418
Conversation
Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @jsha |
This comment has been minimized.
This comment has been minimized.
06b735e
to
587dff9
Compare
Weird, different size locally vs in CI. Oh well... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, it's really, really important to include a screenshot on a change that's this drastic:
Don't like it.
Also:
-
If the text is going to be aligned to the right, it should be consistently aligned to the right. Notice, in the above screenshot,
array
is ragged-right, butslice
is ragged-left. -
Even if it is consistent, that's merely better. It's not actually good. Large amounts of English, like these descriptions, should always be written left-to-right.
padding: 0; | ||
margin: 0; | ||
} | ||
.item-table > li { | ||
display: table-row; | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.item-table > li > div { | ||
display: table-cell; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can't actually do anything any more.
Yeah that's what I figured, I couldn't figure out how to do it the way it was and having a max width. |
#120595 (comment) cites table layout intrinsic width issues. I'm not sure if that's correct. The issue seems to be that the table columns have different |
587dff9
to
35fb71f
Compare
Finally took the time to update. I reverted back to the table display but with some small differences: there is now a padding at the bottom to make it easier to spot which item's short doc we're reading and also set the width of the items name fixed (to 50% of the parent) so that whatever their size, the display remains the same. Screenshots: |
I'll add GUI tests once we agree with the UI changes. @rustbot ready |
This comment has been minimized.
This comment has been minimized.
Does @the8472's solution work? It might look better than the fixed-width setup with huge gaps. |
If one item is super long and the others are "normal", then the rendering is the same. One thing I dislike with the current display is that the position of the short documentation changes depending on the width of the biggest item name. That's why I decided to go for fixed width (with still handling too long name). |
Okay, that makes sense. Next question: instead of making the name 50% of the size, make it 33%? Item names are usually a lot shorter than descriptions, and the huge blank space between them makes it hard to match them up (especially since there’s no zebra striping on this table). |
That's a good point. Gonna add UI tests to this new size then. |
35fb71f
to
c820a23
Compare
Reduced the width of items name to 33% and added a GUI test. |
@bors r+ |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127418 (Wrap too long type name) - rust-lang#127594 (Fuchsia status code match arm) - rust-lang#127835 (Fix ICE in suggestion caused by `⩵` being recovered as `==`) - rust-lang#127858 (match lowering: Rename `MatchPair` to `MatchPairTree`) - rust-lang#127871 (Mention that type parameters are used recursively on bivariance error) - rust-lang#127913 (remove `debug-logging` default from tools profile) - rust-lang#127925 (Remove tag field from `Relation`s) - rust-lang#127929 (Use more accurate span for `addr_of!` suggestion) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#127418 (Wrap too long type name) - rust-lang#127594 (Fuchsia status code match arm) - rust-lang#127835 (Fix ICE in suggestion caused by `⩵` being recovered as `==`) - rust-lang#127858 (match lowering: Rename `MatchPair` to `MatchPairTree`) - rust-lang#127871 (Mention that type parameters are used recursively on bivariance error) - rust-lang#127913 (remove `debug-logging` default from tools profile) - rust-lang#127925 (Remove tag field from `Relation`s) - rust-lang#127929 (Use more accurate span for `addr_of!` suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 8 pull requests Successful merges: - rust-lang#127418 (Wrap too long type name) - rust-lang#127594 (Fuchsia status code match arm) - rust-lang#127835 (Fix ICE in suggestion caused by `⩵` being recovered as `==`) - rust-lang#127858 (match lowering: Rename `MatchPair` to `MatchPairTree`) - rust-lang#127871 (Mention that type parameters are used recursively on bivariance error) - rust-lang#127913 (remove `debug-logging` default from tools profile) - rust-lang#127925 (Remove tag field from `Relation`s) - rust-lang#127929 (Use more accurate span for `addr_of!` suggestion) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127418 - GuillaumeGomez:wrap-too-long-type-name, r=notriddle Wrap too long type name Fixes rust-lang#120595. Takeover of rust-lang#126209. cc `@BradMarr` r? `@notriddle`
width: 33%; | ||
} | ||
.item-table > li > div { | ||
padding-bottom: 5px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GuillaumeGomez Maybe it's just me but this makes the spacing in the y-axis look so "wasteful" and a bit unnatural. Is this really necessary? Or why can't we keep the old behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…llaumeGomez rustdoc: revert spacing change in item-table It really wasn't necessary for the bug fix, and could reasonably be considered a functional regression. In response to rust-lang#127418 (comment)
Rollup merge of rust-lang#128051 - notriddle:notriddle/spacing, r=GuillaumeGomez rustdoc: revert spacing change in item-table It really wasn't necessary for the bug fix, and could reasonably be considered a functional regression. In response to rust-lang#127418 (comment)
Fixes #120595.
Takeover of #126209.
cc @BradMarr
r? @notriddle