-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[docs] display preview warning and decorator info #26819
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
docs/next/styles/globals.css
Outdated
@@ -104,6 +104,10 @@ dt > a.reference.internal { | |||
@apply inline-flex items-center px-3 py-0.5 rounded-full align-middle text-xs uppercase font-medium bg-sea-foam text-gable-green | |||
} | |||
|
|||
.preview-tag { |
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.
Do we also need a .preview-tag.flag.preview
for the API docs? Looking at superseded and deprecated, we have two different CSS per flag, but it's not the case for experimental.
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.
That CSS hasn't been touched in quite some time, but it looks like @hellendag was the one to do it. Perhaps he would know. 🤔
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.
I think the [foo]-tag
classname is added in MDX components, and flag [foo]
is added via Sphinx, and I think to be safest we would want to include both selectors.
.preview-tag,
.flag.preview {
...
}
So any of the rules where they are currently separate (e.g. .superseded-tag
has a separate rule from .flag.superseded
), we probably want them to be combined instead.
Additionally:
- There are two rules below that have
.legacy-tag
, but only one should. (I think probably not theflag.superseded
one?) .deprecated-tag
and.flag.deprecated
have different styles, which seems like it probably wasn't intentional. Maybe these should be unified?
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.
Thanks @hellendag ! I updated the CSS for the preview flag c70913b and fixed the superseded and deprecated ones here.
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.
CSS here and in the other PR lgtm, thanks!
2470b5e
to
2b8ada1
Compare
2b8ada1
to
c70913b
Compare
docs/next/styles/globals.css
Outdated
@@ -104,6 +104,11 @@ dt > a.reference.internal { | |||
@apply inline-flex items-center px-3 py-0.5 rounded-full align-middle text-xs uppercase font-medium bg-sea-foam text-gable-green | |||
} | |||
|
|||
.preview-tag, | |||
.flag.preview{ |
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.
Linter should probably catch this, but
.flag.preview{ | |
.flag.preview { |
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.
Good catch, thanks!
## Summary & Motivation Updates the CSS for superseded and deprecated flags as discussed [here](#26819 (comment))
Summary & Motivation
Same as #25362 but for the new preview decorator introduced in #26747