Skip to content
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(NotificationBadge): refactor to use status buttons for penta #10020

Conversation

wise-king-sullyman
Copy link
Contributor

@wise-king-sullyman wise-king-sullyman commented Jan 18, 2024

What: Closes #9811

Additional issues:

Core is removing the notification badge, this PR internally replaces our notification badge with the button component while keeping the external API the same.

Convenience link: https://patternfly-react-pr-10020.surge.sh/components/notification-badge

@wise-king-sullyman wise-king-sullyman linked an issue Jan 18, 2024 that may be closed by this pull request
@patternfly-build
Copy link
Contributor

patternfly-build commented Jan 18, 2024

@wise-king-sullyman wise-king-sullyman requested review from a team, nicolethoen, mfrances17, andrew-ronaldson, lboehling and mattnolting and removed request for a team January 18, 2024 19:27
Copy link
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

It looks like there is an extra pf-m-start class on the notification badges in the first example causing the icon to be slightly misaligned to the left?
Screenshot 2024-01-18 at 4 09 56 PM

@wise-king-sullyman
Copy link
Contributor Author

@nicolethoen I think that might be more of a bug with button, but there are some ways we could resolve it NotificationBadge side.

I could pass the icon as a child of the Button when there isn't a count, and to the icon prop when there is so that things are properly spaced. How that will work with children of NotificationBadge could be tricky though.

I wonder if we should cut the flexibility of NotificationBadge back in penta since if a more custom solution is needed consumers can just customize the stateful Button themselves 🤔

Copy link
Collaborator

@andrew-ronaldson andrew-ronaldson left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

May be worth making a codemod just to warn consumers about the markup change

Copy link
Collaborator

@lboehling lboehling left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

CSS wise 👍🏼

@thatblindgeye thatblindgeye merged commit 719f078 into patternfly:v6 Jan 31, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(Notification badge): Consume Penta tokens
6 participants