Skip to content

feat(NotificationBadge): Add animation for notify #11675

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

Merged
merged 6 commits into from
Mar 18, 2025

Conversation

mfrances17
Copy link
Contributor

@mfrances17 mfrances17 commented Mar 13, 2025

What: Closes #10624

@patternfly-build
Copy link
Contributor

patternfly-build commented Mar 13, 2025

@thatblindgeye thatblindgeye requested review from srambach, a team, lboehling, bekah-stephens and kaylachumley and removed request for a team March 13, 2025 20:06
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.

Met with Kayla quickly this morning to confirm expectation for when animations should be triggered. What you have here is essentially the expectation, i.e. we don't bake any specific logic internally, and instead the consumer has to handle logic when setting the hasAnimation prop. What I had done was whip up a quick example where hasAnimation={count % 5 === 0} so that the pf-m-notify class was applied or removed based on the count (no rhyme or reason to this, I just arbitrarily chose that condition).

Just some quick comments below based on the convo she and I had and what I noticed. I think this would be good to add any tests + example and pull out of draft.

@mfrances17 mfrances17 marked this pull request as ready for review March 17, 2025 20:36
@mfrances17 mfrances17 requested review from a team, wise-king-sullyman and kmcfaul and removed request for a team March 17, 2025 20:40
Copy link

@kaylachumley kaylachumley left a comment

Choose a reason for hiding this comment

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

the animation itself looks good, just doubling down on the request for a reset animation button and a start or trigger animation button for example purposes(button could reset count to zero if its been triggered a bunch)

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.

😍 this is looking nice, just one quick update below otherwise this is lgtm

@srambach
Copy link
Member

Personally I'd put a button that just increments the count and has it notify each time, maybe a button to reset the count but that seems less important. I just sort of would like to be able to see that you can notify multiple times and having the count appear and disappear because it goes between zero and non-zero sort of obscures that. Also, because the buttons all shift when the count appears, it feels more obtrusive than it really is. But I can be convinced to leave it as is if others are happy.

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.

Code lgtm. +1 Sarah's suggestion with the demo but I think it can be done in a follow up if we want to get this PR in faster.

Copy link
Member

@srambach srambach left a comment

Choose a reason for hiding this comment

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

Beautiful tintinnabulation! 🔔

@thatblindgeye thatblindgeye merged commit 37ad42b into patternfly:main Mar 18, 2025
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 - add animation for "notify" animation
7 participants