fix(clipboard-copy): update icons and verify tokens#8228
fix(clipboard-copy): update icons and verify tokens#8228mcoker merged 9 commits intopatternfly:mainfrom
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:
WalkthroughUpdates ClipboardCopy component to replace the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 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 |
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/ClipboardCopy/examples/ClipboardCopy.md`:
- Line 174: The button partial currently uses button--icon="rh-ui-copy-fill"
while its aria-label is "Run in web terminal", creating a semantic mismatch;
update the element so the visual icon and accessible label match by either
changing button--icon to a terminal/run icon (replace
button--icon="rh-ui-copy-fill" with the appropriate terminal icon name) or by
changing aria-label to a copy-focused text such as "Copy" to align with
button--icon="rh-ui-copy-fill" in the ClipboardCopy example.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 2a90a36e-87d0-4781-a0cd-36b215128f93
📒 Files selected for processing (1)
src/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md
|
Preview: https://pf-pr-8228.surge.sh A11y report: https://pf-pr-8228-a11y.surge.sh |
|
@bekah-stephens, quick question. I noticed the token used for the read-only background color was correct but the actually value was different from the figma file. Does that value need to be updated? It was the difference between something like a -200 and a -300. |
bekah-stephens
left a comment
There was a problem hiding this comment.
For the default state, the expanded area should use the default control tokens for the background and stroke colors.
Fill: global/background/color/control/default
Stroke: global/border/color/control/default
For the read-only state, the expanded area should use the read-only control tokens for the background and stroke colors.
Fill: global/background/color/control/read-only
Stroke: global/border/color/control/read-only
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/ClipboardCopy/examples/ClipboardCopy.md`:
- Line 270: Fix the typo in the table row describing the expandable readonly
modifier: change "boarder" to "border" in the cell that mentions
`.pf-m-expandable-readonly` and `.pf-v6-c-clipboard-copy__expandable-content` so
the description reads "Modifies expandable content to match readonly form
control background and border."
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 9fce8e53-2a4b-43a1-bc09-c970b430f507
📒 Files selected for processing (3)
src/patternfly/components/ClipboardCopy/clipboard-copy-expandable-content.hbssrc/patternfly/components/ClipboardCopy/clipboard-copy.scsssrc/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md
✅ Files skipped from review due to trivial changes (1)
- src/patternfly/components/ClipboardCopy/clipboard-copy-expandable-content.hbs
src/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md
Outdated
Show resolved
Hide resolved
src/patternfly/components/ClipboardCopy/clipboard-copy-expandable-content.hbs
Outdated
Show resolved
Hide resolved
mcoker
left a comment
There was a problem hiding this comment.
Feature changes look good! Can you make a couple of small updates to the docs?
src/patternfly/components/ClipboardCopy/clipboard-copy-expandable-content.hbs
Outdated
Show resolved
Hide resolved
src/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md
Outdated
Show resolved
Hide resolved
src/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md
Outdated
Show resolved
Hide resolved
mcoker
left a comment
There was a problem hiding this comment.
Just a small syntax thing, but I would add clipboard-copy--IsReadonly="true" to the non-expandable example, too, even though it doesn't do anything at the moment. In react, we have a isReadOnly prop you apply to <ClipboardCopy /> so I'm thinking this class goes on any read-only clipboard copy component.
| | `.pf-m-block` | `.pf-v6-c-clipboard-copy.pf-m-inline` | Modifies the inline copy clipboard component to have block formatting. | | ||
| | `.pf-m-truncate` | `.pf-v6-c-clipboard-copy.pf-m-truncate` | Modifies the inline copy clipboard component for use with text used in trucate component. | | ||
| | `.pf-m-expanded` | `.pf-v6-c-clipboard-copy` | Modifies the clipboard copy component for the expanded state. | | ||
| | `.pf-m-readonly` | `.pf-v6-c-clipboard-copy` | Modifies the clipboard copy component for read-only styles | |
There was a problem hiding this comment.
| | `.pf-m-readonly` | `.pf-v6-c-clipboard-copy` | Modifies the clipboard copy component for read-only styles | | |
| | `.pf-m-readonly` | `.pf-v6-c-clipboard-copy` | Modifies the clipboard copy component for read-only styles. | |
…der color of form control read-only input
…adonly on the root so read-only appearance is driven from the component, aligned with clipboard-copy--IsReadonly and updated examples/docs.
…entation, remove extra space
4cdd568 to
faeca7d
Compare
|
@bekah-stephens, I did a rebase because the tokens looked wrong and that pretty much fixed everything. Also changed the copy for the read-only items. |
There was a problem hiding this comment.
Can you add the readonly class to this, too? Not sure if you saw it but I mentioned updating this in my last review comment here - #8228 (review)
| {{#> clipboard-copy clipboard-copy--id="basic-readonly" clipboard-copy--IsReadonly="true"}} |
|
🎉 This PR is included in version 6.5.0-prerelease.64 🎉 The release is available on: Your semantic-release bot 📦🚀 |



Summary
Update the Clipboard Copy component to use the correct copy icon and confirm token usage.
What changed
copytorh-ui-copy-fillacross all Clipboard Copy examples so the component uses the intended design-system icon.src/patternfly/components/ClipboardCopy/examples/ClipboardCopy.md— allbutton--icon="copy"references are nowbutton--icon="rh-ui-copy-fill"(basic, expandable, inline compact, and all variants).Fixes #8186
Verification
Summary by CodeRabbit
New Features
Documentation