Repository navigation
feat(icon)!: port to <pf-v6-icon> - #3164
Draft
bennypowers wants to merge 2 commits into
Draft
bennypowers wants to merge 2 commits into
bennypowers wants to merge 2 commits into
Conversation
cem serve routes pf-v5-* elements at /components/{name}/demo but pf-v6-*
elements at /components/v6-{name}/demo. The slug derivation previously
stripped every version prefix, so v6 elements navigated to 404s, or to a
v5 element's demos on tag collisions (for example pf-v6-icon resolved to
the pf-v5-icon demo index), making their e2e snapshot tests pass
vacuously.
Strip only the pf- prefix and the v5- version prefix so that v6 tags keep
their v6- route segment.
Assisted-By: Claude Code <noreply@anthropic.com>
Ports the icon element to PatternFly v6 designs and the React Icon component's API. pf-v5-icon remains available while the remaining v5 elements port over. Element API: - sizes: sm through 3xl, plus body and heading text sizes - icon-size attribute to size the icon independently of its container - status attribute for semantic status colors - inline attribute to inherit the surrounding text's size and color - in-progress attribute and progress slot, swapping the icon for a spinner (or slotted element) without shifting surrounding content - mirror-rtl attribute to mirror the icon in right-to-left languages - accessible-label attribute, exposing the icon as a labelled image; without it the icon is decorative and hidden from assistive technology, including while in progress - loading attribute controls eager, idle, or lazy (default) fetching Fixes carried over from the v5 element: - changing the set attribute now re-resolves the icon - the icon attribute no longer sprouts on unconfigured instances - the mirror-rtl rule matches in both Chromium and Firefox Assisted-By: Claude Code <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 8862d4e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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 |
Contributor
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "feat(icon)!: port to `<pf-v6-icon>`"
} |
Contributor
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Contributor
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
Ports the icon element to PatternFly v6 designs and the React
Iconcomponent's API, per #3014.smthrough3xl, body sizes, and heading sizes;icon-sizesizes the icon within its containerstatusattribute for semantic status colors,inlineto inherit surrounding text size and colorin-progressattribute andprogressslot swap the icon for a spinner without shifting surrounding contentmirror-rtlmirrors the icon in RTL languages (verified in Chromium and Firefox)accessible-labelexposes a labelled image; otherwise the icon is decorative and hidden from assistive technology, including while in progressaddIconSet,resolve,reset,loadanderrorevents (now consistently non-bubbling)Bugs fixed relative to the v5 element:
setattribute now re-resolves the iconiconattribute no longer sprouts on unconfigured instanceswarningstatus color matches the v6 token chain (yellow-30, verified against the React component)mirror-rtlnow applies in Firefox as well as Chromiumaria-hiddenuses valid string values)imgroleAlso fixes
PfeDemoPagedemo-route navigation forpf-v6-*elements (previously navigated to 404s or to a v5 element's demos), and reworks the two web-component-specific demos to work oncem servewithout unmapped dependencies.Testing Instructions
npm run dev, then openhttp://localhost:8000/components/v6-icon/demo/?rendering=chromelessnpx wtr elements/pf-v6-icon/test/pf-v6-icon.spec.ts(39 tests)PW_EXPERIMENTAL_TS_ESM=1 npx playwright test elements/pf-v6-icon(snapshot and SSR)Notes to Reviewers
patternflyicon set show a curated icon list; new v6 pficons (severity icons,treeview,multicluster) land once Release v2.0.0: regeneratepatternflyicon set from PatternFly v6 sources icons#29 ships v2 of@patternfly/icons, which this element'spatternflyset demos depend onprogressIconSizeanddefaultProgressArialabelare intentionally not ported; the README documents the web-component equivalents (spinner diameter custom property and progress slot)🤖 Generated with Claude Code