fix(breadcrumbs): update tokens and icons - #8259
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughUpdated Breadcrumb and MenuToggle templates and styles: breadcrumb font-size token changed to global default, added text-decoration-color variables with hover/focus variants; breadcrumb example badge modifier toggled to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ 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. Comment |
|
Preview: https://pf-pr-8259.surge.sh A11y report: https://pf-pr-8259-a11y.surge.sh |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/patternfly/components/Breadcrumb/breadcrumb.scss (1)
79-90:⚠️ Potential issue | 🟠 MajorReplace deprecated
word-break: break-wordon line 89 with the CSS standard replacement.The
word-break: break-wordproperty is deprecated per the W3C CSS Text Module specification and is flagged by stylelint. Modern browsers and validators recommend usingoverflow-wrap: anywherecombined withword-break: normalas the equivalent replacement.♻️ Proposed fix
.#{$breadcrumb}__link { text-decoration-color: var(--#{$breadcrumb}__link--TextDecorationColor); - word-break: break-word; + overflow-wrap: anywhere; + word-break: normal; background-color: var(--#{$breadcrumb}__link--BackgroundColor);Note: At least 13 other components in the codebase have the same deprecated property and should be updated similarly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/patternfly/components/Breadcrumb/breadcrumb.scss` around lines 79 - 90, In .#{$breadcrumb}__link replace the deprecated declaration "word-break: break-word" with the modern equivalent by setting "word-break: normal" and adding "overflow-wrap: anywhere" to preserve the intended wrapping behavior; update the rules inside the .#{$breadcrumb}__link block (and apply the same change to the other components that use word-break: break-word) so stylelint/W3C-compliant properties are used.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/patternfly/components/Breadcrumb/breadcrumb.scss`:
- Around line 79-90: In .#{$breadcrumb}__link replace the deprecated declaration
"word-break: break-word" with the modern equivalent by setting "word-break:
normal" and adding "overflow-wrap: anywhere" to preserve the intended wrapping
behavior; update the rules inside the .#{$breadcrumb}__link block (and apply the
same change to the other components that use word-break: break-word) so
stylelint/W3C-compliant properties are used.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 3d1381c8-4730-407e-9bca-62ca09f4001b
📒 Files selected for processing (5)
src/patternfly/components/Breadcrumb/breadcrumb.scsssrc/patternfly/components/Breadcrumb/examples/Breadcrumb.mdsrc/patternfly/components/MenuToggle/menu-toggle-toggle-icon.hbssrc/patternfly/components/MenuToggle/menu-toggle.hbssrc/patternfly/components/MenuToggle/menu-toggle.scss
bekah-stephens
left a comment
There was a problem hiding this comment.
the only thing I noticed is that the breadcrumb text looks a little small. it looks like it's still 12 px, but should now be 14 px (Body/Default/Regular)
There was a problem hiding this comment.
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/MenuToggle/menu-toggle.scss`:
- Around line 152-153: The small padding variables
(--#{$menu-toggle}--m-plain--m-small--PaddingInlineStart /
--#{$menu-toggle}--m-plain--m-small--PaddingInlineEnd) are defined but never
applied by the .pf-m-small modifier; update the .pf-m-small rule (or the plain
small mapping) so that .pf-m-small maps
--#{$menu-toggle}--m-small--PaddingInlineStart and
--#{$menu-toggle}--m-small--PaddingInlineEnd to the small values (or directly
set the element's --#{$menu-toggle}--PaddingInlineStart/End from the
--m-plain--m-small variables) so the small horizontal padding is actually used
by the menu toggle.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 4544f8c6-24b3-4a68-a14c-4aa5cd9b96a7
📒 Files selected for processing (2)
src/patternfly/components/Breadcrumb/examples/Breadcrumb.mdsrc/patternfly/components/MenuToggle/menu-toggle.scss
🚧 Files skipped from review as they are similar to previous changes (1)
- src/patternfly/components/Breadcrumb/examples/Breadcrumb.md
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/patternfly/components/Breadcrumb/breadcrumb.scss (1)
89-89: Pre-existing:break-wordis deprecated forword-break.Stylelint flags
word-break: break-wordas deprecated. While this isn't part of the current changes, consider updating to the modern equivalent if touching this area in the future:- word-break: break-word; + overflow-wrap: break-word;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/patternfly/components/Breadcrumb/breadcrumb.scss` at line 89, Replace the deprecated rule in breadcrumb.scss: change the usage of "word-break: break-word" to the modern equivalent by setting "overflow-wrap: anywhere" and ensure "word-break" is set to "normal" (i.e., replace the single deprecated declaration with overflow-wrap: anywhere; and word-break: normal; in src/patternfly/components/Breadcrumb/breadcrumb.scss where the word-break: break-word rule appears).
🤖 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/Breadcrumb/breadcrumb.scss`:
- Line 89: Replace the deprecated rule in breadcrumb.scss: change the usage of
"word-break: break-word" to the modern equivalent by setting "overflow-wrap:
anywhere" and ensure "word-break" is set to "normal" (i.e., replace the single
deprecated declaration with overflow-wrap: anywhere; and word-break: normal; in
src/patternfly/components/Breadcrumb/breadcrumb.scss where the word-break:
break-word rule appears).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 14152371-95e8-499b-9221-6a266fda92ef
📒 Files selected for processing (1)
src/patternfly/components/Breadcrumb/breadcrumb.scss
mcoker
left a comment
There was a problem hiding this comment.
Oops I missed one thing in the review. Looks like there is one more element that needs a font-size update.
There was a problem hiding this comment.
I think this should be default, too. You can see it here - https://pf-pr-8259.surge.sh/components/breadcrumb#with-heading
| --#{$breadcrumb}__heading--FontSize: var(--pf-t--global--font--size--body--default); |
Or you could try setting it to --#{$breadcrumb}__item--FontSize, which means it will just match whatever the breadrumb item font-size is, which I think is the point. Seems like this would be better, assuming it works everywhere.
|
🎉 This PR is included in version 6.5.0-prerelease.66 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Closes #8185
This PR updates to the Breadcrumb component and related MenuToggle component:
Breadcrumb Component:
MenuToggle Component:
pf-m-plainmodifier to use pill-shaped border radius by defaultpf-m-pillvariant needed)Summary by CodeRabbit
Style
Documentation