Skip to content

fix: updated with tokens for menu and menu toggle with unified changes - #8195

Merged
mcoker merged 11 commits into
patternfly:mainfrom
dlabaj:issue-8060-menu
Mar 31, 2026
Merged

mcoker merged 11 commits into
patternfly:mainfrom
dlabaj:issue-8060-menu

Conversation

@dlabaj

@dlabaj dlabaj commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

Closes issue #8060 and #8139.

Summary by CodeRabbit

  • Style
    • Refined Menu spacing: reduced horizontal paddings and tightened list/item inline spacing for a more compact layout.
    • Improved Menu corner rounding: border-radius now consistently applies to items, lists, and hover/focus states for smoother visuals.
    • Exposed adjustable paddings and item radius properties to simplify Menu spacing and rounding customization.
    • Standardized MenuToggle corners so toggles render consistently across controls.

@dlabaj
dlabaj requested a review from mcoker March 3, 2026 14:25
@coderabbitai

coderabbitai Bot commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Updated Menu SCSS to add root inline padding tokens, introduce a per-item border-radius token, propagate radii to list pseudo-elements and item containers, and reduce item horizontal padding; adjusted MenuToggle default border-radius tokens for main and plain variants.

Changes

Cohort / File(s) Summary
Menu component
src/patternfly/components/Menu/menu.scss
Added root inline padding tokens (--menu--PaddingInlineStart/End), changed block paddings to xs, introduced --menu__item--BorderRadius and used it to compute root --menu--BorderRadius, applied border-radius to __list-item :before and __item container, and reduced item horizontal padding (lg → md).
MenuToggle component
src/patternfly/components/MenuToggle/menu-toggle.scss
Updated default border-radius tokens: --menu-toggle--BorderRadius and --menu-toggle--m-plain--BorderRadius changed from global--border--radius--small to global--border--radius--control--default.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

Needs design review

Suggested reviewers

  • thatblindgeye
  • mcoker
  • lboehling
  • srambach
🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title follows conventional commit format with 'fix:' prefix but is vague about the specific changes, using generic language like 'updated with tokens' without clearly describing what was fixed. Improve title clarity by specifying the exact nature of the fix, such as 'fix: unify menu and menu-toggle border radius tokens' to better convey the main objective of the changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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.

@coderabbitai
coderabbitai Bot requested review from lboehling and srambach March 3, 2026 14:26
@patternfly-build

patternfly-build commented Mar 3, 2026 •

Copy link
Copy Markdown
Collaborator

@dlabaj dlabaj changed the title fix: Updated with tokens for menu unified changes. fix: updated with tokens for menu unified changes Mar 4, 2026
@dlabaj
dlabaj requested a review from thatblindgeye March 4, 2026 17:03
@dlabaj

dlabaj commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

@thatblindgeye For menu toggle I've changed the radius. I know you have the menu toggle issue this upcoming sprint.

@coderabbitai coderabbitai Bot left a comment

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.

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/Menu/menu.scss`:
- Around line 483-485: The CSS uses tokens --#{$menu}__list--PaddingInlineStart
and --#{$menu}__list--PaddingInlineEnd inside the .#{$menu}__list rule but those
custom properties are not defined here, so add definitions (or fallback values)
for --#{$menu}__list--PaddingInlineStart and --#{$menu}__list--PaddingInlineEnd
before they are used (for example define them on .#{$menu} or :root, or supply
var(..., <fallback>) in the padding-inline-start/end declarations); update the
$menu__list token definitions or the .#{$menu} selector so .#{$menu}__list has
valid default values to prevent the declarations from being dropped.
- Around line 487-490: The selector currently matches descendant dividers and
allows nested lists to inherit divider margins; change the selector to only
target direct children by replacing :where(.#{$divider}:is(li)) with a
child-scoped selector (e.g. > .#{$divider}:is(li)) so the margin-block-start/end
CSS using var(--#{$menu}__list--divider--MarginBlockStart) and
var(--#{$menu}__list--divider--MarginBlockEnd) only applies to top-level list
items and not nested drilldown/flyout lists.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: 79ee72e8-2b4b-4e4d-b5dc-4aecc30f4c0b

📥 Commits

Reviewing files that changed from the base of the PR and between eae94f7 and 5018621.

📒 Files selected for processing (1)
  • src/patternfly/components/Menu/menu.scss

Comment thread src/patternfly/components/Menu/menu.scss Outdated
Comment thread src/patternfly/components/Menu/menu.scss Outdated

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 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/Menu/menu.scss`:
- Line 17: The current menu outer radius calculation uses
--#{$menu}--BorderRadius: calc(var(--#{$menu}__item--BorderRadius) +
var(--#{$menu}--PaddingBlockStart)), which can misalign corners when inline and
block paddings differ; update this by either introducing a dedicated
outer-radius token (e.g. --#{$menu}--OuterBorderRadius) and derive
--#{$menu}--BorderRadius from it, or compute it with a robust calc that accounts
for both paddings (e.g. using max(var(--#{$menu}--PaddingBlockStart),
var(--#{$menu}--PaddingInlineStart)) plus var(--#{$menu}__item--BorderRadius));
change the SCSS variable declaration for --#{$menu}--BorderRadius accordingly
and ensure any consuming styles use the new token/name.

ℹ️ Review info
⚙️ Run configuration

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

Review profile: ASSERTIVE

Plan: Pro

Run ID: a66106e4-f69e-492e-81a5-9780372be920

📥 Commits

Reviewing files that changed from the base of the PR and between 5018621 and 5d2276d.

📒 Files selected for processing (1)
  • src/patternfly/components/Menu/menu.scss

Comment thread src/patternfly/components/Menu/menu.scss
@dlabaj

dlabaj commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

Created follow up issue #8201

@dlabaj
dlabaj force-pushed the issue-8060-menu branch from ffb4eec to a40b5f8 Compare March 5, 2026 20:13
@dlabaj dlabaj linked an issue Mar 5, 2026 that may be closed by this pull request
@dlabaj dlabaj changed the title fix: updated with tokens for menu unified changes fix: updated with tokens for menu and menu toggle with unified changes Mar 5, 2026
@dlabaj

dlabaj commented Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

Added code to resolve issue #8139 as well.

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

@mcoker mcoker left a comment

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.

Some updates needed to the menu component from our group review

  • Update menu item hover/focus high contrast border to be on all sides instead of just top/bottom
  • Update inline padding for footer, group titles, and breadcrumbs elements to match menu item inline padding. Also just scan the component examples for any other things that look like they're not aligned or have different insets.
  • Group titles need to be bold font weight and regular text color (instead of subtle)
  • Update menu row gap and divider top/bottom padding/margin to xs spacer

@mcoker mcoker left a comment

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.

For menu toggle we also need to update icons - cog, status, and ellipsis icons should all use RH UI "filled" icons.

Design is going to follow up on the caret icon size to see if brand can adjust the size of the icon - if not, we may need to add a scale to make the icon visually smaller but that can be a follow up.

@dlabaj

dlabaj commented Mar 25, 2026

Copy link
Copy Markdown
Contributor Author

@mcoker Should be all set except for the caret icon as we are waiting on brand. We can do a separate issue if we are going to be held up by this. Let me know and I can put one in.

@mcoker mcoker left a comment

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.

🚀

@mcoker
mcoker merged commit f5d9a20 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.

Menu Toggle: update tokens and icons

3 participants