Conversation
|
Some changes occurred in GUI tests. Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @lolbinarycat Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_hir/src/attrs |
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| --notable-badge-pink: oklch(0.88 0.21 0); | ||
| --notable-badge-red: oklch(0.88 0.21 40); | ||
| --notable-badge-orange: oklch(0.88 0.21 70); | ||
| --notable-badge-grey: oklch(0.88 0 0); |
There was a problem hiding this comment.
We're now switching to 8 colors?
There was a problem hiding this comment.
I can’t find it in the meeting minutes, but I remember mentioning the possibility of using the ANSI 3-bit color pallet, because it makes both directions of interop easier:
- terminal apps like rusty-man can display these colors without requiring their own bespoke color theming system
- anyone adding new themes to rustdoc-html can easily use a terminal color theme as a starting point
| border-color: #0f1419; | ||
| } | ||
| /* https://github.com/rust-lang/rust/pull/91480 */ | ||
| .notabletrait-badge.light.grey { |
There was a problem hiding this comment.
I'm really not sure it's worth it to show people how to add their own colors.
There was a problem hiding this comment.
I kept the list, but got rid of the examples.
| --notable-badge-violet: oklch(0.88 0.21 300); | ||
| --notable-badge-magenta: oklch(0.88 0.21 320); | ||
| --notable-badge-cyan: oklch(0.88 0.21 180); | ||
| --notable-badge-transparent: white; |
There was a problem hiding this comment.
I don't think having text floating around is a good idea, especially when it's a color picked by rustdoc automatically...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Guillaume Gomez <contact@guillaume-gomez.fr>
3e4974b to
ad71924
Compare
|
Some changes occurred in compiler/rustc_attr_ir |
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
Add test cases, and the same detailed info block that you get for return position notable traits.
|
@GuillaumeGomez @ThierryBerger I've done some tweaks to take into account feedback from these discussions, plus a few things I noticed while looking around the standard library:
|
ad71924 to
17ce955
Compare
This comment has been minimized.
This comment has been minimized.
This still produces the feature gate error, so it's fine, but it also produces the "trait attribute" warning
| return; | ||
| }; | ||
| let Some(notable_trait_color) = notable_trait_color.value_as_str() else { | ||
| cx.emit_lint(INVALID_DOC_ATTRIBUTES, InvalidNotableTraitAttr, span); |
There was a problem hiding this comment.
Would be nice to give some extra info because they all emit the same lint with the same span. Or was it on purpose while waiting for team's approval?
There was a problem hiding this comment.
I figured that sort of thing could be handled in a follow-up, after we decide on the syntax we want at all.
There was a problem hiding this comment.
Then add a fixme comment and open an issue.
42a349f to
8e7178c
Compare
|
Looks good to me, thanks! Let's ping the rest of the front-end members. cc @rust-lang/rustdoc-frontend. This is making some changes to he display of notable traits. In particular, it adds the |
| fn from(color: NotableTraitColor) -> &'static str { | ||
| use NotableTraitColor::*; | ||
| match color { | ||
| Grey => "grey", |
There was a problem hiding this comment.
do we want to support both spellings of gray/grey? if not, i believe "gray" is the more common in US english, which is what rustdoc uses (otherwise this would be colour)
There was a problem hiding this comment.
I thought gray was only a name until now. I'd been in favour of only using grey, as for foreigners, it's how we learn the color name (or colour :p).
|
This is an implementation of the earlier idea proposed by the bevy people that integrates more tightly with |
|
An extension. Can be compared with the existing: https://doc.rust-lang.org/nightly/std/fs/struct.File.html |
View all comments
Part of #45040
Preview
https://notriddle.com/rustdoc-html-demo-13/gui-tests/lib2/notable_trait_colors/struct.NotableTraitColors.html
Screenshots