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(notification-badge): added expanded state #5048

Merged
merged 3 commits into from Sep 1, 2022

Conversation

mcoker
Copy link
Contributor

@mcoker mcoker commented Aug 19, 2022

fixes #4664

@patternfly-build
Copy link

patternfly-build commented Aug 19, 2022

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.

Looks good to me @mcoker . Do we need any follow up to start using this in out masthead demos and examples?

@mcoker mcoker requested a review from srambach August 22, 2022 18:58
@mcoker
Copy link
Contributor Author

mcoker commented Aug 22, 2022

@mcarrano yep, that's probably a good idea. I can go through the core demos and make any updates needed in this PR, or we can make that a separate task. I already updated the notification drawer demos in this PR which I think is all that needs to be updated. Then we'll need a react issue to do the same.

We may also consider removing the notification bell from the default masthead used in full-page demos, and only including it when clicking on it opens a notification drawer. Otherwise the basic full-page demo masthead would just include generic actions and basic functionality (a dropdown or whatever would trigger a menu, but with generic items). WDYT?

@mcarrano
Copy link
Member

That all sounds good @mcoker . Maybe open follow-up issues and I'll pull them into a future milestone?


```hbs
<div class="pf-t-dark">
{{#> button button--modifier="pf-m-plain" button--attribute='aria-label="Notifications" aria-expanded="true"'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Were you using aria-expanded="true" here instead of button--IsExpanded="true" to avoid applying pf-m-expanded to the button itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it's only supported on the control button, and noticed the notification badge button in the masthead was using the expanded class, so updated that just to be aria-expanded, too. Looking at the react component, I think we'll want to add that there, too - https://github.com/patternfly/patternfly-react/blob/main/packages/react-core/src/components/NotificationBadge/NotificationBadge.tsx

@@ -108,9 +111,15 @@
color: var(--pf-c-notification-badge--m-attention--Color);

&:hover {
--pf-c-notification-badge--after--BackgroundColor: var(--pf-c-notification-badge--m-attention--hover--after--BackgroundColor);
--pf-c-notification-badge--m-attention--after--BackgroundColor: var(--pf-c-notification-badge--m-attention--hover--after--BackgroundColor);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@mattnolting mattnolting left a comment

Choose a reason for hiding this comment

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

LGTM 👍 Just a couple comments.

@srambach
Copy link
Member

srambach commented Aug 30, 2022

Just checking - is this the intended dark theme color (especially for the attention one)? Just seems off to me. 🤷 Also, I see a slight change in the icon color on hover for the gray one but not the others; again, just checking that is intentional.
image

@mcoker
Copy link
Contributor Author

mcoker commented Aug 30, 2022

@srambach good callouts. I have an issue here for the attention icon color - #5049. For now I've updated it to be black to match our danger button.

The read icon should be white (or whatever the hover color is) when expanded. Updated that, too!

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.

LGTM 🔔

@mcoker mcoker merged commit ae9f524 into patternfly:main Sep 1, 2022
@patternfly-build
Copy link

🎉 This PR is included in version 4.211.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Add selected state for masthead items
5 participants