Skip to content

Conversation

@nicolethoen
Copy link
Contributor

What: Closes #4535

Additional issues:

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jul 31, 2020

@mcoker
Copy link
Contributor

mcoker commented Jul 31, 2020

@nicolethoen this looks great! A few things:

  • The parent .pf-c-page__header-tools-item element with the notification bell icon should have .pf-m-selected when the drawer is open.
  • The notification bell disappears on a mobile viewport. It should be visible on all viewports
  • The grouped notification drawer is showing some old styles - namely that groups shouldn't scroll independently of the overall notification list. You can compare this demo to the core grouped demo. I assume that will resolve with a core bump?

Copy link
Member

@mcarrano mcarrano left a 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?

@nicolethoen
Copy link
Contributor Author

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
the new react notification badge has not been merged yet. It should update automatically.

Once merged, is there any reason one of these demos should use the 'attention state' notification badge?

@mcarrano
Copy link
Member

mcarrano commented Aug 3, 2020

@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?

@nicolethoen
Copy link
Contributor Author

@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
should I just use the attention state in one of the existing two examples on this PR or make a whole new example?

kmcfaul
kmcfaul previously approved these changes Aug 3, 2020
Copy link
Contributor

@kmcfaul kmcfaul left a 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.

@mcarrano
Copy link
Member

mcarrano commented Aug 3, 2020

@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.

@nicolethoen
Copy link
Contributor Author

@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 pf-m-selected modifier being applied to the badge when the drawer is open.

@codecov-commenter
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@cc17bf2). Click here to learn what that means.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #4640   +/-   ##
=========================================
  Coverage          ?   52.41%           
=========================================
  Files             ?      509           
  Lines             ?     8944           
  Branches          ?     3253           
=========================================
  Hits              ?     4688           
  Misses            ?     3670           
  Partials          ?      586           
Flag Coverage Δ
#patternfly4 52.41% <71.42%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/react-core/src/components/Page/Page.tsx 73.17% <66.66%> (ø)
...ts/NotificationDrawer/NotificationDrawerHeader.tsx 100.00% <100.00%> (ø)
...ckages/react-core/src/components/Banner/Banner.tsx 100.00% <0.00%> (ø)
...react-core/src/components/Modal/ModalBoxHeader.tsx 80.00% <0.00%> (ø)
packages/react-topology/src/elements/BaseEdge.ts 1.61% <0.00%> (ø)
...ion/src/components/ConfirmButton/ConfirmButton.tsx 100.00% <0.00%> (ø)
...tension/src/components/CatalogTile/CatalogTile.tsx 80.00% <0.00%> (ø)
...-core/src/components/Page/PageHeaderToolsGroup.tsx 100.00% <0.00%> (ø)
...core/src/components/DataList/DataListItemCells.tsx 100.00% <0.00%> (ø)
...ChartBullet/ChartBulletComparativeErrorMeasure.tsx 92.30% <0.00%> (ø)
... and 501 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc17bf2...5b7506b. Read the comment docs.

@nicolethoen nicolethoen force-pushed the notification_drawer_demo branch from 14cac83 to 42c7fd1 Compare August 4, 2020 15:42
</Text>
{count && <span className={css(styles.notificationDrawerHeaderStatus)}>{`${count} ${unreadText}`}</span>}
{count !== undefined && (
<span className={css(styles.notificationDrawerHeaderStatus)}>{`${count} ${unreadText}`}</span>
Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you propose?

Copy link
Collaborator

@jschuler jschuler Aug 4, 2020

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` />

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@mturley mturley left a 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.

@tlabaj tlabaj merged commit 3b9231d into patternfly:master Aug 4, 2020
@patternfly-build
Copy link
Collaborator

Your changes have been released in:

  • @patternfly/react-catalog-view-extension@4.8.0
  • @patternfly/react-charts@6.9.0
  • @patternfly/react-core@4.39.0
  • @patternfly/react-docs@5.8.0
  • @patternfly/react-icons@4.7.0
  • @patternfly/react-inline-edit-extension@4.5.56
  • demo-app-ts@4.28.2
  • @patternfly/react-styles@4.7.0
  • @patternfly/react-table@4.15.0
  • @patternfly/react-tokens@4.9.0
  • @patternfly/react-topology@4.4.58
  • @patternfly/react-virtualized-extension@4.5.46

Thanks for your contribution! 🎉

@nicolethoen nicolethoen deleted the notification_drawer_demo branch February 8, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification drawer demo

9 participants