-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add Notification Inline #1332
Add Notification Inline #1332
Conversation
🦋 Changeset detectedLatest commit: f771c33 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 |
Hey @amelako, Thanks! |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sumup/oss-circuit-ui/bhVhkXNAtvVck9yNAqFhaDtY613A |
Codecov Report
@@ Coverage Diff @@
## main #1332 +/- ##
==========================================
- Coverage 92.23% 92.20% -0.03%
==========================================
Files 190 191 +1
Lines 3787 3838 +51
Branches 1209 1224 +15
==========================================
+ Hits 3493 3539 +46
- Misses 275 279 +4
- Partials 19 20 +1
|
9a8502a
to
38935f7
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.
I like the direction this is going!
Added a few general comments on the component and the docs for now, I'll also re-review later.
For docs I'm kind of missing something that explains what the difference between the toast and this component is, in terms of behavior, a11y etc. They're pretty similar and I expect that some developers will find it confusing. Could we add this somewhere (in the intro maybe)?
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.stories.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
} | ||
| { onClose?: never; closeButtonLabel?: never }; | ||
|
||
export type BaseProps = HTMLAttributes<HTMLDivElement> & { |
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.
Can we share some of these props between the toast and this component? There should be few differences
packages/circuit-ui/components/NotificationInline/NotificationInline.tsx
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.stories.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.tsx
Outdated
Show resolved
Hide resolved
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.
Oops I submitted the previous review by mistake and didn't have time to finish writing my thoughts down
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.stories.tsx
Outdated
Show resolved
Hide resolved
bb5a785
to
e9c7e22
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.
Just a few extra thoughts about docs, thanks for addressing my previous review's more general comments 🙌
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationInline/NotificationInline.docs.mdx
Outdated
Show resolved
Hide resolved
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.
Nice! Let's release this and I might add a bit more to the docs separately 👀 The new component looks great!
Co-authored-by: Robin Métral <robin.metral@sumup.com>
86a1824
to
f771c33
Compare
Addresses #792.
Purpose
Introduces the new NotificationInline component.
The Notification Inline component non-disruptively provides quick and contextual inline notification and it is integrated within the content section.
It comes in 4 variants, "info", "confirm", "notify" and "alert".
To communicate a message always provide a body copy, and if needed an optional headline can be included above the body copy and an action button.
Inline notifications are part of the content and should be placed near their related part of the content.
Inline notifications can be dismissed by clicking on a close button in the top-right corner.
Approach and changes
Refer to the Storybook for further implementation and usage guidelines, and to the threads below for more details and discussion on the implementation.
Definition of done