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

Add copy button in install code screen, #PG-3520 #814

Merged
merged 9 commits into from
Jul 10, 2024

Conversation

AltamashShaikh
Copy link
Contributor

@AltamashShaikh AltamashShaikh commented Jul 3, 2024

Description:

Add copy button in install code screen
Fixes: #812 & #PG-3520
Require: matomo-org/matomo#22366

Review

@AltamashShaikh
Copy link
Contributor Author

I added a test for Clipboard copy, but facing same as what we are facing in CrashAnalytics so removed the test.

@sgiehl
Copy link
Member

sgiehl commented Jul 3, 2024

@AltamashShaikh Weren't the changes in matomo-org/matomo#22332 meant for making that possible?

@AltamashShaikh
Copy link
Contributor Author

AltamashShaikh commented Jul 3, 2024

@AltamashShaikh Weren't the changes in matomo-org/matomo#22366 meant for making that possible?

@sgiehl If you checkout this PR and click Install Code under TagManager menu and try to copy the MTM code by clicking copy button, it will not copy anything. On debugging I found out that we need to set focus to allow it to copy.

Screenshot from 2024-07-03 13-35-08

So the changes in matomo-org/matomo#22366 adds only the focus to make copy work in modal. Puppeter issue is different.

@snake14
Copy link
Contributor

snake14 commented Jul 3, 2024

@sgiehl Sadly, matomo-org/matomo#22332 didn't solve the Puppeteer issue as I had hoped, either.

Copy link
Contributor

@snake14 snake14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Once I pulled the latest version of core, the button copied the code snippet to my clipboard as expected 👍

Copy link
Contributor

@araichyk araichyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, works well once I pull core code. Good issue to fix, nice one 👍

@AltamashShaikh AltamashShaikh merged commit 9b22911 into 5.x-dev Jul 10, 2024
4 checks passed
@AltamashShaikh AltamashShaikh deleted the PG-3520-copy-button branch July 10, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UX - Add an icon to copy/paste the Matomo Tag Manager container
4 participants