openshift / console

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
397 stars 607 forks source link

CONSOLE-4139: replace react-copy-to-clipboard with PatternFly Clipboa… #14327

Open rhamilto opened 1 week ago

rhamilto commented 1 week ago

…rdCopyButton component

There are additional instances of react-copy-to-clipboard that will be addressed by:

After

https://github.com/user-attachments/assets/44c8f67c-8f38-4ab6-ba06-353865deb7b8

https://github.com/user-attachments/assets/1b5393cc-81f6-4048-b50c-f3a8d2fc761c

openshift-ci-robot commented 1 week ago

@rhamilto: This pull request references CONSOLE-4139 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/console/pull/14327): >…rdCopyButton component Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
openshift-ci-robot commented 1 week ago

@rhamilto: This pull request references CONSOLE-4139 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/console/pull/14327): >…rdCopyButton component > >There is an additional instance of `react-copy-to-clipboard` that will be addressed by https://issues.redhat.com/browse/ODC-7698 > >After > >https://github.com/user-attachments/assets/44c8f67c-8f38-4ab6-ba06-353865deb7b8 > >https://github.com/user-attachments/assets/1b5393cc-81f6-4048-b50c-f3a8d2fc761c Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rhamilto commented 1 week ago

/assign @TheRealJon /assign @yapei

Adding approvals since this is tech debt: /label px-approved /label docs-approved

rhamilto commented 1 week ago

/retest

openshift-ci[bot] commented 6 days ago

@rhamilto: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
yapei commented 5 days ago

tested the PR and no regression issues found /label qe-approved

openshift-ci-robot commented 5 days ago

@rhamilto: This pull request references CONSOLE-4139 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/console/pull/14327): >…rdCopyButton component > >There is an additional instance of `react-copy-to-clipboard` that will be addressed by https://issues.redhat.com/browse/ODC-7698 > >After > >https://github.com/user-attachments/assets/44c8f67c-8f38-4ab6-ba06-353865deb7b8 > >https://github.com/user-attachments/assets/1b5393cc-81f6-4048-b50c-f3a8d2fc761c Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
yapei commented 5 days ago

I'm testing on a cluster-bot cluster launch openshift/console#14327 and seeing different behavior for an external link, after content is copied, it shows 'copied to clipboard' (for secret data it shows 'copied')

https://github.com/user-attachments/assets/35952f57-7ae9-46bc-9b54-246f99df4bf5

openshift-ci-robot commented 4 days ago

@rhamilto: This pull request references CONSOLE-4139 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/console/pull/14327): >…rdCopyButton component > >There is an additional instances of `react-copy-to-clipboard` that will be addressed by: >* https://issues.redhat.com/browse/ODC-7698 >* https://issues.redhat.com/browse/CNV-49317 > >After > >https://github.com/user-attachments/assets/44c8f67c-8f38-4ab6-ba06-353865deb7b8 > >https://github.com/user-attachments/assets/1b5393cc-81f6-4048-b50c-f3a8d2fc761c Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rhamilto commented 4 days ago

I'm testing on a cluster-bot cluster launch openshift/console#14327 and seeing different behavior for an external link, after content is copied, it shows 'copied to clipboard' (for secret data it shows 'copied')

Good catch, @yapei. It turns out the ExternalLinkWithCopy component has been duplicated in https://github.com/openshift/networking-console-plugin and the bug exists there (in addition to that duplicated component needing to be updated to use CopyClipboardButton). I've opened https://issues.redhat.com/browse/CNV-49317 to address.

rhamilto commented 4 days ago

/hold

I should be able to convert the exiting unit test to RTL using https://testing-library.com/docs/user-event/clipboard/

openshift-ci-robot commented 3 days ago

@rhamilto: This pull request references CONSOLE-4139 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.18.0" version, but no target version was set.

In response to [this](https://github.com/openshift/console/pull/14327): >…rdCopyButton component > >There are additional instances of `react-copy-to-clipboard` that will be addressed by: >* https://issues.redhat.com/browse/ODC-7698 >* https://issues.redhat.com/browse/CNV-49317 > >After > >https://github.com/user-attachments/assets/44c8f67c-8f38-4ab6-ba06-353865deb7b8 > >https://github.com/user-attachments/assets/1b5393cc-81f6-4048-b50c-f3a8d2fc761c Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Fconsole). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
rhamilto commented 3 days ago

/assign @jhadvig

rhamilto commented 1 day ago

/hold cancel

openshift-ci[bot] commented 1 hour ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jhadvig, rhamilto

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[frontend/OWNERS](https://github.com/openshift/console/blob/master/frontend/OWNERS)~~ [jhadvig,rhamilto] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment