Skip to content

fix(button): define missing variables and remove unused ones#8136

Open
tarunvashishth wants to merge 1 commit intopatternfly:mainfrom
tarunvashishth:fix/button-unused-variables
Open

fix(button): define missing variables and remove unused ones#8136
tarunvashishth wants to merge 1 commit intopatternfly:mainfrom
tarunvashishth:fix/button-unused-variables

Conversation

@tarunvashishth
Copy link
Copy Markdown
Contributor

@tarunvashishth tarunvashishth commented Feb 16, 2026

Fixes #7952

PR Summary
This PR fixes undefined/unused Button CSS variable issues in src/patternfly/components/Button/button.scss.

  • Added missing display-lg token: --#{$button}--m-display-lg--FontSize.
  • Wired --#{$button}--m-display-lg--FontWeight into .pf-m-display-lg.
  • Replaced hardcoded disabled border color with --#{$button}--disabled--BorderColor.
  • Wired hover icon transition delay token into hover/focus state.
  • Added base corner-radius fallback tokens (BorderStartStart/StartEnd/EndStart/EndEndRadius) to match existing var(...) usage.
  • Removed unused --#{$button}__progress--Opacity.

Summary by CodeRabbit

  • New Features

    • Added corner radius customization options for button styling
    • Enhanced typography controls for large button variants
  • Style

    • Improved icon hover transition timing controls
    • Enhanced disabled state border visibility
    • Refined progress element styling

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 16, 2026

No actionable comments were generated in the recent review. 🎉


Walkthrough

This PR fixes undefined and unused variables in the Button component SCSS by defining missing font size and weight properties for the large display variant, introducing corner-specific border radius variables, wiring transition delay for hover icon animations, utilizing the previously unused disabled border color variable, and removing unused progress opacity definitions.

Changes

Cohort / File(s) Summary
Button Styling Variables
src/patternfly/components/Button/button.scss
Added four corner-specific border radius variables (BorderStartStartRadius, BorderStartEndRadius, BorderEndStartRadius, BorderEndEndRadius). Defined missing FontSize and FontWeight variables for m-display-lg variant. Introduced TransitionDelay variable for hover icon animations and wired it in hover state. Changed disabled ripple border-color from transparent to use --#{$button}--disabled--BorderColor variable. Removed unused progress opacity definition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Merge Conflict Detection ⚠️ Warning ❌ Merge conflicts detected (32 files):

⚔️ .github/ISSUE_TEMPLATE/design_handoff.yml (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_basic_0_document_0_mobile.png (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_basic_0_document_1_tablet.png (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_basic_0_document_2_desktop.png (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_groups_0_document_0_mobile.png (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_groups_0_document_1_tablet.png (content)
⚔️ backstop_data/bitmaps_reference/pf-core__components_notification-drawer_html_groups_0_document_2_desktop.png (content)
⚔️ package.json (content)
⚔️ src/patternfly/base/patternfly-common.scss (content)
⚔️ src/patternfly/base/patternfly-svg-icons.scss (content)
⚔️ src/patternfly/base/tokens/tokens-dark.scss (content)
⚔️ src/patternfly/base/tokens/tokens-default.scss (content)
⚔️ src/patternfly/base/tokens/tokens-glass-dark.scss (content)
⚔️ src/patternfly/base/tokens/tokens-glass.scss (content)
⚔️ src/patternfly/base/tokens/tokens-local.scss (content)
⚔️ src/patternfly/base/tokens/tokens-palette.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat-dark.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat-glass-dark.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat-glass.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat-highcontrast-dark.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat-highcontrast.scss (content)
⚔️ src/patternfly/base/tokens/tokens-redhat.scss (content)
⚔️ src/patternfly/components/Button/button.scss (content)
⚔️ src/patternfly/components/Compass/compass.scss (content)
⚔️ src/patternfly/components/Drawer/drawer.scss (content)
⚔️ src/patternfly/components/Hero/hero.scss (content)
⚔️ src/patternfly/components/Masthead/masthead.scss (content)
⚔️ src/patternfly/components/NotificationDrawer/notification-drawer.scss (content)
⚔️ src/patternfly/components/Table/examples/Table.md (content)
⚔️ src/patternfly/components/Table/table-grid.scss (content)
⚔️ src/patternfly/demos/Table/examples/Table.md (content)
⚔️ yarn.lock (content)

These conflicts must be resolved before merging into main.
Resolve conflicts locally and push changes to this branch.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title follows conventional commit format with 'fix' prefix and clearly describes the main changes: defining missing variables and removing unused ones in the button component.
Linked Issues check ✅ Passed All coding objectives from issue #7952 are addressed: defined --#{$button}--m-display-lg--FontSize, wired --#{$button}--m-display-lg--FontWeight, replaced hardcoded disabled border with variable, wired hover icon transition delay, and removed unused --#{$button}__progress--Opacity.
Out of Scope Changes check ✅ Passed All changes align with the objectives to fix undefined/unused variables in button.scss; no unrelated modifications were introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 Feb 16, 2026

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.

Bug - Button - Unused/undefined variables

2 participants