Skip to content
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

chore: add XCopyButton component #2531

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented May 3, 2024

We have some places where we need eXtra eXtensions on top of KCopy

This adds a thin wrapper over KCopy and builds things out so we can use XCopyButton (née KCopy) everywhere without it being problematic.

I've kept TextWithCopyButton at least temporarily but it now just wraps over XCopyButton. We use TextWithCopyButton quite a lot so I haven't gone through and search/replaced all the usages, I may do that here and then also TextWithCopyButton so we only have one copy button thing.

I also added back in our clipboard debugging tooling that I originally added in #1981 and was removed in #2374

Last, I originally called this XCopy (like KCopy), but then realized this problem was probably caused by this naming (no explicit *Button) so I called it XCopyButton to make it clear this is a button and doesn't need to be/shouldn't be wrapped in another button

Closes #2513

Related: #2517 (<== I thought this was a fix but it wasn't)

Copy link

netlify bot commented May 3, 2024

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit e9c76c5
🔍 Latest deploy log https://app.netlify.com/sites/kuma-gui/deploys/663b993915878c000739e89b
😎 Deploy Preview https://deploy-preview-2531--kuma-gui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@johncowen johncowen changed the title chore: add XCopy chore: add XCopy component May 3, 2024
@johncowen johncowen mentioned this pull request May 3, 2024
@johncowen johncowen marked this pull request as ready for review May 3, 2024 16:09
@johncowen johncowen requested a review from a team as a code owner May 3, 2024 16:09
@johncowen johncowen self-assigned this May 3, 2024
@johncowen johncowen changed the title chore: add XCopy component chore: add XCopyButton component May 7, 2024
Signed-off-by: John Cowen <john.cowen@konghq.com>
@johncowen johncowen merged commit 7b32cbb into kumahq:master May 21, 2024
15 checks passed
johncowen added a commit that referenced this pull request May 22, 2024
A while back we decided we wanted a split linting environment (#1179) which we did alongside other improvements in #2545.

Since then we've decided to stick to one single linting environment, i.e. the stricter one. But we still only want to apply fixes on pre-commit and not in CI (CI should fail not fix).

---

I also noticed that:

- We needed `console.info` (you can see usage in  #2531), so aswell as adding that I changed the `console.log`s we used in a cypress config to use `console.info` instead.
- `npm install` was being passed `--frozen-lockfile` which is a `yarn` argument, it should be `npm clean-install`


Signed-off-by: John Cowen <john.cowen@konghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Copy as K8s" no longer works
2 participants