FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(Notification Badge): Adds the notification badge component by dlabaj · Pull Request #2342 · patternfly/patternfly-react · GitHub

feat(Notification Badge): Adds the notification badge component - #2342

Merged
tlabaj merged 3 commits into
patternfly:masterfrom
dlabaj:notification-badge
Jun 27, 2019
Merged

feat(Notification Badge): Adds the notification badge component#2342
tlabaj merged 3 commits into
patternfly:masterfrom
dlabaj:notification-badge

Conversation

dlabaj commented Jun 24, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

What:
Adds the notification badge component to react core.

Additional issues:
#2021

dlabaj added 2 commits June 24, 2019 13:51
Added the notificatoin badge component.  Currently adding the typescript integreation tests.  Will
update the PR when they are done.

"fix #2021"
dlabaj self-assigned this Jun 24, 2019
dlabaj changed the title Fixes #2021: Notification badge component feat(notificationbadge): Notification badge component Jun 24, 2019
dlabaj changed the title feat(notificationbadge): Notification badge component feat(Notification Badge): Adds the notification badge component Jun 24, 2019

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2342.surge.sh

}
onClick = () => {
this.setState({
isRead: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could go with isRead: !this.state.isRead to allow toggling.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks @redallen I figured once you set it you wouldn't want to show unread again, but if we want I can update the example to have it toggle. Just let me know I'm fine either way.

};
this.onClick = () => {
this.setState({
isRead: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Same with the example.

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@dlabaj Visually this looks good, but I do have a question about behavior. This is intended to work as a toogle for opening and closing the notification drawer. So when the drawer is open it would display a selected state until the user clicks it again to close the drawer. It's hard to tell from the preview of the icon only, but it looks like this is coded to behave link a standard action button.

Here is the latest visual spec: https://marvelapp.com/project/4090736/

dlabaj commented Jun 27, 2019

Copy link
Copy Markdown
Contributor Author

@mcarrano I don't have access to that visual spec above

dlabaj commented Jun 27, 2019

Copy link
Copy Markdown
Contributor Author

@mcarrano Right now this is an external component that can also be used outside of the notification drawer. Is the circle around it when it's toggled on suppose to be shown when it's not used with the notification drawer?

@christiemolloy @mcoker I don't see the toggled on circle in the core example. https://pf4.patternfly.org/components/NotificationBadge/examples/ Is this being added in a modifier that we will get later?

dlabaj commented Jun 27, 2019

Copy link
Copy Markdown
Contributor Author

@mcarrano Spoke with Mary and she's going to add that selected state when the drawer is open to this issue patternfly/patternfly#1832. When we get this in core and it is time to add it to react we will add that to the notification badge in the masthead at that time. Does that sound good?

christiemolloy commented Jun 27, 2019
edited
Loading

Copy link
Copy Markdown
Member

This looks great @dlabaj and we hadn't addressed the circle background behind the icon yet because we still need to discuss how to best implement it in Core. I'm going to create a separate issue for it because patternfly/patternfly#1832 is large and addresses different concepts. Issue here: patternfly/patternfly#1998 ... @rachael-phillips making you aware.

Copy link
Copy Markdown
Member

@dlabaj @christiemolloy this all makes sense and thanks for identifying the approach here. I that case I will go ahead and approve of this PR.

mcarrano self-requested a review June 27, 2019 19:43

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm good to merge this when ready.

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

tlabaj merged commit a0e7965 into patternfly:master Jun 27, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL