NO-JIRA: fix radius of button groups#784
NO-JIRA: fix radius of button groups#784openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
Conversation
📝 WalkthroughWalkthroughAdded MuiButtonGroup theme customization to the Patternfly-to-Material-UI theme mapper, introducing styleOverrides for button group container and internal button elements to adjust border-radius properties across root, grouped, firstButton, lastButton, and middleButton variants. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
web/src/components/dashboards/perses/PersesWrapper.tsx (1)
221-242:root's& .MuiButton-rootdescendant selector is redundant given the direct slot overrides.The
grouped,firstButton,lastButton, andmiddleButtonslots already target each button in the group directly with!important, so the inner& .MuiButton-rootrule insiderootis fully redundant — both ultimately apply the same property and value to the same DOM nodes.MUI v6 explicitly designed
firstButton/lastButton/middleButtonso users can override styles viastyleOverrideswithout needing to fight specificity inside therootslot. The descendant-selector approach inrootis the old MUI v5 pattern and can be dropped here.♻️ Proposed simplification
MuiButtonGroup: { styleOverrides: { - root: { - // Remove border-radius from button groups to prevent pill shape - '& .MuiButton-root': { - borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', - }, - }, grouped: { - borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', + borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', }, firstButton: { - borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', + borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', }, lastButton: { - borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', + borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', }, middleButton: { - borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', + borderRadius: 'var(--pf-t--global--border--radius--tiny) !important', }, }, },The diff also fixes the double-space before
!importantin the slot values (lines 230, 233, 236, 239) to be consistent with the rest of the overrides in this file.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@web/src/components/dashboards/perses/PersesWrapper.tsx` around lines 221 - 242, Remove the redundant descendant selector in MuiButtonGroup.styleOverrides.root — delete the '& .MuiButton-root' rule since the grouped/firstButton/lastButton/middleButton slot overrides already apply the same borderRadius; also normalize spacing by removing the extra space before '!important' in the grouped, firstButton, lastButton and middleButton values so they match the rest of the overrides (refer to MuiButtonGroup, styleOverrides, and the grouped/firstButton/lastButton/middleButton slots).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@web/src/components/dashboards/perses/PersesWrapper.tsx`:
- Around line 221-242: Remove the redundant descendant selector in
MuiButtonGroup.styleOverrides.root — delete the '& .MuiButton-root' rule since
the grouped/firstButton/lastButton/middleButton slot overrides already apply the
same borderRadius; also normalize spacing by removing the extra space before
'!important' in the grouped, firstButton, lastButton and middleButton values so
they match the rest of the overrides (refer to MuiButtonGroup, styleOverrides,
and the grouped/firstButton/lastButton/middleButton slots).
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to data retention organization setting
📒 Files selected for processing (1)
web/src/components/dashboards/perses/PersesWrapper.tsx
|
/label qe-approved |
|
image used to test: quay.io/rh-ee-emurasak/monitoring-console-plugin:PR784 |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jgbernalp, zhuje The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test e2e-aws-ovn |
|
/override ci/prow/e2e-aws-ovn |
|
@jgbernalp: Overrode contexts on behalf of jgbernalp: ci/prow/e2e-aws-ovn DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/retitle NO-JIRA: fix radius of button groups |
|
@zhuje: This pull request explicitly references no jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
@zhuje: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |


Before

After

Summary by CodeRabbit