-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Notice: Add new "Inline" variation with a more subdued design #22924
Conversation
`is-inline` to add a more subdued variation of the notice design.
Feels better to me. Aside (not related to this PR): I'm feeling |
I think notices in general are becoming convoluted and confused in their purpose, but the design here looks good, and it's better than it was before. |
I already expressed the following to @shaunandrews, but def worth elaborating on here: I think it might be a bit complex to have an extra prop for this. It might be forgotten or used inconsistently unintentionally. I do like the way they look inline. I wonder if all Notices should look similar with the lighter theme. The global notices, however could remain the dark theme. This would sort of separate them out and keep their purposes/visuals clearer for folks. Thoughts? |
Are there places 'inline' where we would rather use the 'compact' notice (dark) style instead of the light style? Or for conjecture, could you overwrite the compact notices with this style @shaunandrews to let us play around with that and see if it could be a permanent replacement? I agree with @drw158 that notices are really being stretched in their purpose. So maybe it would be easiest to let global notices be the dark style (since it does really contrast from the page) and we use Shaun's style in the page inline. It seems to satisfy the accessibility concerns, I'd just like to confirm it looks alright in real world scenarios. |
Personally, I've needed a light-style inline notice for things that do not need immediate attention (like a global notice). In this example, it's a permanent notice, so I didn't feel like a dark notice would be appropriate. I like the idea of inline notices defaulting to light, and global ones defaulting to dark, but with the option to change. I could see a case where someone might want to use a dark inline notice. One example of a dark inline notice, would be the domain upgrade notice in the sidebar. |
I feel there's an overlap with terms... maybe not, but just to be sure I also did a cross-check on how the component structure is now.
I was mentioning above the split Which means that So:
Elaborating on this, I'd suggest this approach:
I'd approach this by creating a new Once this component split is done, we can evolve the two with their specific use case and intent in mind. Thoughts? |
That makes sense @folletto and is a more articulate proposal than I made. |
@drw158 I would suggest using the Banner component instead for things that are more like ads or less urgent CTAs. |
Yep: |
@MichaelArestad I considered that, and that's what my mockup shows (with an adjustment to the icon), but I felt it wasn't a good solution because it looks different than the other notices (solid block of color of the left and slight differences to the type). Also, I really felt it should be an alert/notice and not a generic banner. |
Are there other notices on that view that it conflicts with? It looks like the exact use case for Banner. We use it for similar things all the time, especially plan upgrade pitches. |
@MichaelArestad there aren't any other notices or banners on that page that I'm aware of, but it's just a static mockup at this point.
I disagree on this point.
It could be worded better, but this is really an alert or informative notice, not an ad. US and the $25 are prerequisites for using the Google AdWords coupon, and the user should be aware of that (If I'm not mistaken). But it's not urgent, which is why I don't think a dark notice is appropriate. Overall, I don't mind using the banner temporarily, but it's not an ideal solution, and I think this kind of problem will come up again, and we could do more to accommodate different needs. |
Just for the sake of this PR — I think the proposal above should solve the issue regardless of what's being decided at the end (the banner discussion on the specific case above can happen elsewhere). :) |
@folletto: I think this is what you meant, but wanted to clarify. If style componentization is the goal, I'd recommend that |
I've not reviewed the code close enough to make a call on that. I think that as long as it's a separate component – thus allowing more clear intent – and it's maintainable, I think it hits the spot. |
This branch needs a rebase. Is this PR still required? |
Sometimes the
<Notice>
component is used inline on a page./plugins/
is a prime example:The problem here is that these notices tend to really stand out. Maybe thats the point, and they should be acted upon. But I thought I'd try to see if we could offer a more subdued variant of notices that better "fit" in these types of use cases:
--
I add a new prop to
<Notice>
calledisInline
which toggles a classis-inline
to add a more subdued variation of the notice design. Its currently only updated to be used on/plans/
.This should help fix #20017