-
Notifications
You must be signed in to change notification settings - Fork 355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(clipboardcopy): add clipboardcopy to PF4 #1538
Conversation
PatternFly-React preview: https://1538-pr-patternfly-react-patternfly.surge.sh |
Codecov Report
@@ Coverage Diff @@
## master #1538 +/- ##
==========================================
+ Coverage 82.77% 82.79% +0.01%
==========================================
Files 601 604 +3
Lines 6642 6655 +13
Branches 72 72
==========================================
+ Hits 5498 5510 +12
- Misses 1117 1118 +1
Partials 27 27
Continue to review full report at Codecov.
|
patternfly/patternfly#505 - here is the relevant patternfly core issue/design links |
Related issue: #1417 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@boaz0 @christiemolloy Yes, the message that appears after you click Copy should stay for at least 2 seconds (maybe more?). We did not have a spec on this but I would try adding a 2 second timer and see how that feels. Also, I noticed that in the Expandable version, the expansion area is not editable. It needs to be if a user is to be able to edit the entire contents. Also note that per the design. we should show the truncation ellipses when the text in the field gets truncated. See below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add this the the react-integration app?
packages/patternfly-4/react-core/src/components/ClipboardCopy/ClipboardCopy.js
Outdated
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/ClipboardCopy.js
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/CopyButton.d.ts
Outdated
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/copyFunction.js
Outdated
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/examples/ExpandedClipboardCopy.js
Outdated
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/ClipboardCopy.js
Show resolved
Hide resolved
packages/patternfly-4/react-core/src/components/ClipboardCopy/ClipboardCopy.js
Outdated
Show resolved
Hide resolved
Great job on this, @boaz0! This looks great from an a11y perspective!
I agree that the tooltip should remain visible longer. For screen reader users, this pattern requires some updates to the tooltip so that the tooltip can function as an alert. This isn't a variation we support at the moment. I'll capture issues in core and react for this.
This is handled in core css. When I inspect the element, I don't see the overflow property that handles this in core. Maybe this was recently added to the core css and hasn't been pulled in yet? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I had left this comment but it hasn't been implemented yet, could you try implementing the success tooltip to remain for 2 seconds? |
Also, when I type a lot of characters this happens, it might be something that we need on the Core side @mcoker do you know if we should add |
@christiemolloy do you mind verifying that it is OK now. Thanks a lot |
@boaz0 Im still seeing this |
It's going to be replaced by Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way documentation is generated has been changed. Can you please remove the examples file. All examples should be in the md file.
@tlabaj yes sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Boaz Shuster <[email protected]>
1 - We need to update the patternfly-next package to have that change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
import { ClipboardCopy } from '@patternfly/react-core'; | ||
class SimpleClipboardCopy extends React.Component { | ||
render() { | ||
return <ClipboardCopy isReadOnly>This is editable</ClipboardCopy>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say "not editable" since it's read only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dang! You're right!
What's the purpose of the If we're going to keep that in the component, and the If it was added to address the text wrapping issue @christiemolloy mentioned, we should be able to address that behavior in core, too, without the need for |
@boaz0 ah, I see! That's definitely a use case for a |
@mcoker |
What:
closes #1417
Adding copy to clipboard into patternfly 4 react-core.