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 clipboard debug #1981

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

johncowen
Copy link
Contributor

@johncowen johncowen commented Jan 9, 2024

Adds a dev only console logger for clipboard copying by decorating KClipboardProvider::copyToClipboard via our development.ts service container config.

Screenshot 2024-01-09 at 10 46 34

Also added a single K8s property to relevant mocks (I figured this was enough to be able to tell if you'd copying the k8s format or not without having to be super realistic with the K8s formatted mock)

All in all this PR helps testing/debugging our copy buttons


Totally non-urgent, I did this while I was trying and figure out what was going on with #1967 and thought I may as well PR it.

Copy link

netlify bot commented Jan 9, 2024

Deploy Preview for kuma-gui ready!

Name Link
🔨 Latest commit 0b3d819
🔍 Latest deploy log https://app.netlify.com/sites/kuma-gui/deploys/659d34a5b92f750008fa99d2
😎 Deploy Preview https://deploy-preview-1981--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.

Signed-off-by: John Cowen <john.cowen@konghq.com>
@johncowen johncowen marked this pull request as ready for review January 9, 2024 12:28
@johncowen johncowen requested a review from a team as a code owner January 9, 2024 12:28
@johncowen johncowen requested review from kleinfreund and removed request for a team January 9, 2024 12:28
@johncowen johncowen merged commit 72e3e6c into kumahq:master Jan 10, 2024
16 checks passed
johncowen added a commit that referenced this pull request Jan 15, 2024
…2006)

I noticed we were getting warnings for re-registering a component due to #1981

This happens both in browser development environments (PR previews and locally) and also CLI based unit tests.

The unit test ones are noisier than the browser ones, seeing as the browser ones need to be looked for.

This PR only does the re-registration if we don't have a `process` meaning it doesn't happen in anything CLI based.

Signed-off-by: John Cowen <john.cowen@konghq.com>
This was referenced Apr 29, 2024
johncowen added a commit that referenced this pull request May 21, 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)

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.

2 participants