-
-
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
feat: Update <Alert>
style
#12422
feat: Update <Alert>
style
#12422
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 11.14kB (0.06%) ⬆️. This is within the configured threshold ✅ Detailed changes
View changes by path for bundle: sentry-docs-server-cjs
|
|
I'm up for increasing the contrast, but I need a bit of guidance as to what colours we could use because I dont want to come up a magic colour value.
@mydea and I checked the codebase for error levels, but could find anything. |
yeah, we did not use I can try to use an even lighter background! |
I could mix the background colors with transparency (TIL I learned about https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/color-mix, really cool!). E.g. mixed with 10% transparency: |
9ca41a5
to
36cd863
Compare
So I re-added cc @inventarSarah we need to define when to use these 🤔 |
b0f114b
to
784c337
Compare
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.
1e1ddf9
to
e19709a
Compare
const Icon = ICON_MAP[level]; | ||
|
||
if (!Icon) { | ||
throw new Error(`Invalid alert level: "${level}" passed to Alert component`); |
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.
@chargome what is your opinion on this? I opted to error out if an invalid level is passed in. this way, you'll know and the build will fail if you do this.
Alternatively, we would have to check the level and fall back to info
if something invalid is passed in 🤔 I think it is more helpful to error there, as we def. had cases where users passed in invalid stuff and possibly did not even notice it. But happy to defer to your POV on this 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.
Yeah throwing in the build makes sense to me when working with MDX 👍
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.
Looks sharp, left a comment on colors but feel free to merge!
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.
great, thank you @mydea !!
The new alerts look really really good!! ♥ I'll update the Contributing to the Docs with information on how and when to use these (#12466) Re the "Danger" alert: |
This updates the style of the
<Alert>
component according to new designes from @Jesse-Box .This also re-introduces the
succeess
levelBefore:
Afterwards:
The
<Note>
component is now just an alias for<Alert>
without a title, it will be removed in a follow up.