-
Notifications
You must be signed in to change notification settings - Fork 376
feat(NotificationDrawer): Add notification drawer demo #4640
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(NotificationDrawer): Add notification drawer demo #4640
Conversation
|
PF4 preview: https://patternfly-react-pr-4640.surge.sh |
|
@nicolethoen this looks great! A few things:
|
mcarrano
left a comment
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 great @nicolethoen . I have the same comment about scrolling behavior as @mcoker . The only other thing is that this still uses the old notification badge component. Any reason we wouldn't pull the new component into this demo?
@mcarrano Once merged, is there any reason one of these demos should use the 'attention state' notification badge? |
|
@nicolethoen regarding the attention state, yes, it would make sense to have a demo of that. However I'm not sure that we totally defined all the rules for when this appear/disappears so maybe pick that up in a follow-on issue? |
@mcarrano |
kmcfaul
left a comment
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 good to me aside from the double scrolling on groups, which should be updated in a that core bump if I'm understanding correctly.
44428cb to
1904bce
Compare
|
@mceledonia Can you take a look at the behavior of the notification badge and verify that it is correct. Should the 'unread' state only display when the drawer is closed? Other than that, I think this is good to go @nicolethoen . It might be nice to show an example of the notification count in the badge, we we could always add that later. |
I think that is a result of the |
Codecov Report
@@ Coverage Diff @@
## master #4640 +/- ##
=========================================
Coverage ? 52.41%
=========================================
Files ? 509
Lines ? 8944
Branches ? 3253
=========================================
Hits ? 4688
Misses ? 3670
Partials ? 586
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
14cac83 to
42c7fd1
Compare
| </Text> | ||
| {count && <span className={css(styles.notificationDrawerHeaderStatus)}>{`${count} ${unreadText}`}</span>} | ||
| {count !== undefined && ( | ||
| <span className={css(styles.notificationDrawerHeaderStatus)}>{`${count} ${unreadText}`}</span> |
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 seems a bit too rigid of a format and won't work well with i18n
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.
What do you propose?
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.
Not a blocker if this was already released, but I question if the count prop here is needed, user could just pass <NotificationDrawerHeader unreadText=`${count} unread` />
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.
ah
NotificationDrawerGroup also expects a count: number; to display in its header.
I guess I'm not sure I see a big difference, and it would be a breaking change to remove count from NotificaitonDrawerHeader
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.
It's a little different in the drawer group because it's just the count there. Here we mandate that count is followed by a space and then a string which is not correct for some languages. This already existed before so not a blocker for this PR tho! But we are accruing technical debt here, since this is a beta component I am not sure if breaking changes are allowed or not.
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.
mturley
left a comment
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 good to me! One possible enhancement that we could maybe add as a followup PR: since you have a "clear all" action, should we maybe put "clear" actions on each notification too? I don't see a way to clear just one, it might be a nice thing to demonstrate.
|
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #4535
Additional issues: