Skip to content

fix: updated with notfication badge with unified theme#8206

Merged
mcoker merged 1 commit intopatternfly:mainfrom
dlabaj:notification-update
Mar 31, 2026
Merged

fix: updated with notfication badge with unified theme#8206
mcoker merged 1 commit intopatternfly:mainfrom
dlabaj:notification-update

Conversation

@dlabaj
Copy link
Copy Markdown
Contributor

@dlabaj dlabaj commented Mar 5, 2026

Updated with notification badge changes per issue #8131

Summary by CodeRabbit

  • Style

    • Standardized button visuals and state appearance by updating border radius and border color tokens; no functional changes.
    • Minor whitespace and formatting cleanups.
  • Refactor

    • Simplified notification badge icon rendering while preserving visual output and behavior.

@dlabaj dlabaj requested review from mcoker and srambach March 5, 2026 14:12
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 5, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 789ad1d9-d96e-41c6-976e-cccc63e6f629

📥 Commits

Reviewing files that changed from the base of the PR and between cf79ab3 and b1aaff6.

📒 Files selected for processing (2)
  • src/patternfly/components/Button/button.scss
  • src/patternfly/components/Button/notification-badge.hbs
✅ Files skipped from review due to trivial changes (2)
  • src/patternfly/components/Button/notification-badge.hbs
  • src/patternfly/components/Button/button.scss

Walkthrough

Updated Button SCSS tokens (border-radius and border-color references) and minor whitespace; replaced inline <i> font-icon markup in the notification badge template with {{pfIcon}} helper branches for task, attention, and default icons.

Changes

Cohort / File(s) Summary
Button styling
src/patternfly/components/Button/button.scss
Changed --#{$button}--m-stateful--BorderRadius to var(--pf-t--global--border--radius--action--plain--default) and --#{$button}--m-read--BorderColor to var(--pf-t--global--border--color--control--default); minor whitespace adjustments.
Notification badge template
src/patternfly/components/Button/notification-badge.hbs
Removed inline <i> markup and replaced conditional icon branches with {{pfIcon ...}} helper calls for task, attention, and default cases.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

Needs react follow up

Suggested reviewers

  • srambach
  • kmcfaul
  • jcmill
  • andrew-ronaldson

Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title follows the conventional commit format with 'fix:' prefix, but contains a typo ('notfication' instead of 'notification') and is somewhat vague about the actual changes made. Correct the typo to 'notification' and consider making the title more specific, e.g., 'fix: update notification badge icon rendering with unified theme tokens'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@patternfly-build
Copy link
Copy Markdown
Collaborator

patternfly-build commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/patternfly/components/Button/button.scss`:
- Line 710: The line defining the CSS variable "--#{$button}--Color:
var(--#{$button}--m-unread--Color);" has incorrect indentation; update the
leading whitespace in src/patternfly/components/Button/button.scss so this line
is indented to match the surrounding block (lines ~711-718) for consistent
formatting of the --#{$button}--Color declaration.

In `@src/patternfly/components/Button/notification-badge.hbs`:
- Around line 13-19: The icons rendered by the pfIcon helper in
notification-badge.hbs (the three pfIcon calls inside the
notification-badge--IsTask / notification-badge--IsAttention / default branches)
are decorative and must be hidden from AT; either update the pfIcon helper to
accept an optional aria-hidden parameter and emit aria-hidden="true" on the
returned SVG when provided, or wrap each pfIcon invocation in a container with
aria-hidden="true" (e.g., a span) so the rendered SVGs are not announced by
screen readers; apply the chosen approach to all three pfIcon usages in this
template.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 90cc0e04-a7f8-474e-984a-e29fd285be24

📥 Commits

Reviewing files that changed from the base of the PR and between d8cc066 and abd71fa.

📒 Files selected for processing (2)
  • src/patternfly/components/Button/button.scss
  • src/patternfly/components/Button/notification-badge.hbs

@dlabaj dlabaj changed the title fix: Updated with notfication badge with unified theme. fix: updated with notfication badge with unified theme Mar 5, 2026
Copy link
Copy Markdown
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.

@nicolethoen I can add another issue for the plain variant if you want to keep these small

This PR looks good to me!

@nicolethoen nicolethoen linked an issue Mar 6, 2026 that may be closed by this pull request
@nicolethoen
Copy link
Copy Markdown
Contributor

@andrew-ronaldson yes thank you!

Copy link
Copy Markdown
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

Nice! Just a couple of things.

Comment on lines +691 to +695
&.pf-m-read,
&.pf-m-unread,
&.pf-m-attention {
--#{$button}--BorderRadius: var(--pf-t--global--border--radius--action--plain--default);
}
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.

Could you just add this to &.pf-m-stateful, or is there a reason that won't work? Stateful buttons are only used for the notification badge states as far as I'm aware.

Also however you end up doing it, can you create a button var for this style at the top of the CSS file and reference that button var in this block? Like if you applied it to .pf-m-stateful, add the var like this

// at the top of the file with the other vars
--#{$button}--m-stateful--BorderRadius: var(--pf-t--global--border--radius--action--plain--default);

// with the other stateful vars
&.pf-m-stateful {
  --#{$button}--BorderRadius: var(--#{$button}--m-stateful--BorderRadius);
}

Copy link
Copy Markdown
Contributor Author

@dlabaj dlabaj Mar 16, 2026

Choose a reason for hiding this comment

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

fixed. Move to just use stateful.

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.

Are you able to remove .pf-m-read, .pf-m-unread, and .pf-m-attention? A button with .pf-m-stateful should always be used with one of those statuses, so just styling .pf-m-stateful should be all you need.

// Unread
&.pf-m-unread {
--#{$button}--Color: var(--#{$button}--m-unread--Color);
--#{$button}--Color: var(--#{$button}--m-unread--Color);
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.

Just a nit but can you add that space back?

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.

Updated.

@andrew-ronaldson
Copy link
Copy Markdown
Collaborator

I added the plain variant issue

@dlabaj dlabaj requested a review from jcmill March 10, 2026 14:56

// Stateful
--#{$button}--m-stateful--BorderRadius: var(--pf-t--global--border--radius--small);
--#{$button}--m-stateful--BorderRadius: var(--pf-t--global--border--radius--action--plain--default);
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.

@mcoker Updated to use stateful per your suggestion in the review.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/patternfly/components/Button/button.scss (1)

736-742: Redundant nested selectors and inconsistent variable usage.

This block appears redundant since line 731 already sets --#{$button}--BorderRadius for all .pf-m-stateful buttons. Additionally:

  1. The &.pf-m-stateful selector (line 740) inside &.pf-m-stateful creates .pf-m-stateful.pf-m-stateful, which is functionally the same as .pf-m-stateful.
  2. This block uses the token directly instead of referencing the variable --#{$button}--m-stateful--BorderRadius defined at line 239.

If this block is intentionally kept for clarity or future extensibility, consider at least removing the redundant &.pf-m-stateful selector and using the variable for consistency:

🔧 Suggested cleanup
   &.pf-m-stateful {
     --#{$button}--BorderRadius: var(--#{$button}--m-stateful--BorderRadius);
     --#{$button}--PaddingInlineStart: var(--#{$button}--m-stateful--PaddingInlineStart);
     --#{$button}--PaddingInlineEnd: var(--#{$button}--m-stateful--PaddingInlineEnd);
     --#{$button}--m-small--PaddingInlineEnd: var(--#{$button}--m-stateful--m-small--PaddingInlineEnd);
     --#{$button}--m-small--PaddingInlineStart: var(--#{$button}--m-stateful--m-small--PaddingInlineStart);
-
-    &.pf-m-read,
-    &.pf-m-unread,
-    &.pf-m-attention,
-    &.pf-m-stateful {
-      --#{$button}--BorderRadius: var(--pf-t--global--border--radius--action--plain--default);
-    }
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/patternfly/components/Button/button.scss` around lines 736 - 742, Remove
the redundant nested selectors and switch to the stateful variable: in the block
containing &.pf-m-read, &.pf-m-unread, &.pf-m-attention, &.pf-m-stateful, delete
the duplicate nested &.pf-m-stateful selector (which produces
.pf-m-stateful.pf-m-stateful) and replace the direct token assignment
--#{$button}--BorderRadius with the stateful token variable
--#{$button}--m-stateful--BorderRadius so the rule reads something like setting
--#{$button}--BorderRadius: var(--#{$button}--m-stateful--BorderRadius) for
those modifiers.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@src/patternfly/components/Button/button.scss`:
- Around line 736-742: Remove the redundant nested selectors and switch to the
stateful variable: in the block containing &.pf-m-read, &.pf-m-unread,
&.pf-m-attention, &.pf-m-stateful, delete the duplicate nested &.pf-m-stateful
selector (which produces .pf-m-stateful.pf-m-stateful) and replace the direct
token assignment --#{$button}--BorderRadius with the stateful token variable
--#{$button}--m-stateful--BorderRadius so the rule reads something like setting
--#{$button}--BorderRadius: var(--#{$button}--m-stateful--BorderRadius) for
those modifiers.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: d1753a55-993c-47d1-875b-1bce0a3cac70

📥 Commits

Reviewing files that changed from the base of the PR and between abd71fa and cf79ab3.

📒 Files selected for processing (1)
  • src/patternfly/components/Button/button.scss

@nicolethoen
Copy link
Copy Markdown
Contributor

@dlabaj this needs a rebase

Copy link
Copy Markdown
Contributor

@mcoker mcoker 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 good but looks like you have a conflict. Good news is I think it's just from something prettier changed.

Can you undo the prettier changes? Sorry about that, I don't think any of the core devs use prettier so we don't get those updates. Related, I put up a PR to disable prettier here - #8257

@dlabaj dlabaj force-pushed the notification-update branch from cf79ab3 to b1aaff6 Compare March 31, 2026 19:42
Copy link
Copy Markdown
Contributor

@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

🚀

@mcoker mcoker merged commit 531a220 into patternfly:main Mar 31, 2026
5 checks passed
@patternfly-build
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 6.5.0-prerelease.63 🎉

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification Badge

5 participants