-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update Notice
component design
#67662
Comments
I agree the Notice component is long overdue a tune-up :)
Removing the left border in general is probably a good idea, it interferes with spacing when inset, and can disappear entirely when outset (if the notice is full width inside a container that clips).
We might consider following the emergent convention in the Badge component. IE an icon is always included when the 'tone' is warning, error, or success. This helps a11y since color alone is not an adequate indicator.
Could you elaborate on this, perhaps with a screenshot example? From the core side of things we should also keep in mind the notices that appear in the editor: Currently these use the cc @jasmussen @jarekmorawski as we were recently discussing this :) |
I would agree. For example I think there are some good patterns to take inspiration from, that @fcoveram worked on for WordPress.org: I'd also tentatively agree that we really don't need that many different visual styles for notices and warnings. They could all look mostly the same. As a provocation: what if they all looked like snackbars, same color too? |
There's definitely some conceptual overlap, so they could share characteristics like radius and elevation. However, I'd recommend avoiding a dark background for now. This is primarily because Notices can include action buttons, and the only |
The editor error boundary no longer uses the The Should we close this old issue in favor of a new discussion here - #34901? Screenshot |
Seems okay to close the old issue. I'm not 100% sure the designs there adhere to the latest conventions for details like typography. |
In WooCommerce's inner notice, we have four colors.
Agreed with what @jasmussen mentioned that we don't need that many colors. Would love to know what y'all think and how we can proceed. Thank you! |
I reckon we can mimic the badge behavior when it comes to icons—If the tone of the notice is error, warning, info, then the icon is included automatically. This is because color alone is not an accessible way to communicate the tone, and the icon gives a familiar at-a-glance indication of the nature of the message. It would be good to think about guidelines for when to use Notices too. For example do we need a neutral notice? Or should notices only be used in situations where a tone is required? Then there's the action buttons to consider. Theming them to match the notice color is going to add a lot of complexity that I don't know is warranted for such a narrow use case. I wonder if the notice background could be white, and color applied elsewhere, maybe to the icon or stroke? |
Good instincts. Relatedly, how can abuse be discouraged? As soon as something becomes pinned and loud like this, it can be used for malicious purposes. "WooCommerce database update required" seems valid enough, as does "There's a new version of WordPress". But "Take part in our Black Friday sale, no now!" is less so. Further: what happens when 10 different plugins send 10 such notices? To be fair they may all be important, but unless you act on them one by one, it's not going to be a legible to anyone. To frame the question differently: should conversations about changes to the notice compenents inner behavior be related to conversations about a notifications tray, that might let us throttle and show at most, say, 3 notices at one time, the rest being overflowed into the tray? Or is this just a visual update? |
Yeah we should keep the Notifications project in mind, although there hasn't been an update in over a year so it doesn't feel imminent(?). For now this is mostly just a visual update, but let's consider how the notices would look in a narrow container like a notifications tray. |
Another thing to consider for this component is how we can better accommodate multiple notifications (with different weights) on pages within the WP ecosystem. This is a very common scenario and stacking notifications is not a scalable solution. We can set up the rules for the Notice component so that it gets swapped with a Multiple-notices component when there is more than one notice on a given page. Below is a quick take on it, WDYT? |
Yeah, those are good points. Review what we have, and I will explore it and share some progress.
Indeed, those are really often seen that notices are yelling for attention on the same page. |
That's an interesting idea, yes, this would also allow eliding (see more) buttons for way too many stacked notices. |
Yeah, collapsing multiple Notices could be a nice interim, until the WP Feature Notifications project gains more traction 👍 I think we should try to respect the tone of the individual notices though. It would be good to get early feedback from the @WordPress/gutenberg-components team on that, in case it would involve a new component. It may need to be a follow up. |
@jameskoster I came here to say exactly this! I see an inline notice as an extension of a @orcunomattic @jarekmorawski I always have some reservations about displaying multiple notifications at the same time, especially when they’re grouped or hidden under a banner. While a nice banner might look clean, it can make notifications too easy to miss, which goes against their main purpose. Notifications should be noticeable enough to grab the user's attention or follow carefully planned rules around their timing and visibility. Design guidelines should clearly define when and how notifications are used. They shouldn’t be persistent to the point where we need to hide them under a banner just to clean up the UI. For example:
|
We already have a |
@rogermattic I think that's a good instinct that touches on a related but probably separate topic: Where in the UI can notices appear? This is likely a broad discussion that needs to happen in a dedicated issue. We need to avoid recreating the Notice Chaos one often finds in wp-admin. Maybe only In terms of the design for individual notices, here are some other points it would be good to explore/document:
|
What problem does this address?
Heya @jameskoster
Coming from the Woo team, we discussed the notice components from both the WordPress Design System (WPDS) and our Woo library. While we aim to align with the design system as much as possible, we'd like to discuss some specific considerations for inline notice usage.
Current status
WordPress Design System (WPDS) banner notice
Woo's inline notice
Observations on Current WPDS
Design elements
Accessibility:
What is your proposed solution?
Proposed enhancements
We'd like to suggest the following additions to the WP notice component:
This is for sure not final but want to bring the visibility to you and get your feedback on direction first before we move further. Or need to follow WPDS button style. Then Magda (I dont' know why I can't tag your name) and I will continue to work on it.
Note
We can reuse Magda's proposed badge component colors:
Thank you!
The text was updated successfully, but these errors were encountered: