-
Notifications
You must be signed in to change notification settings - Fork 3
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
Replace Message with Alert, use in Comment #1373
Conversation
🦋 Changeset detectedLatest commit: ced0f4f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
This looks good!
My one question is whether the alert component should support HTML being passed in instead of text? (So we could include a link, icon, etc.)
If we want to support that use case we may want to replace the message
property with a content slot. If we don't want to support that use case then this looks good to go!
@Paul-Hebert Either is supported! cloudfour.com-patterns/src/components/alert/alert.twig Lines 5 to 11 in ced0f4f
|
Oh, got it. I'd missed that. Awesome! Looks good! |
Overview
The Comment component introduced in #1370 lacked a message for communicating when a comment had been submitted but was still in moderation. The live version of this feature used a component we called Message, which had been recreated in #604. But this pattern's size made it appear more unwieldy in that context, and it didn't seem to respond to our themes. I also found its name somewhat confusing: A comment is a type of message, after all, so it felt a bit off to say "display a message inside of a comment."
So this PR removes Message, introduces a new Alert pattern, and integrates that into Comment for the moderation message feature.
Screenshots
Testing
On the deploy preview…