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

Modal for copying JS script tag #3238

Merged
merged 7 commits into from
May 10, 2023
Merged

Modal for copying JS script tag #3238

merged 7 commits into from
May 10, 2023

Conversation

allisonking
Copy link
Contributor

@allisonking allisonking commented May 5, 2023

Closes #3168

Code Changes

  • Refactors the existing ClipboardButton component
  • Adds a JavaScriptTag component—a button + modal
  • Adds cypress-real-events to enable testing clipboard/copy-paste events
  • Cypress test

Steps to Confirm

  • Visit the privacy experience page
  • There should be a "Get JavaScript tag" button
  • Clicking on it should bring a modal where you can click the Copy icon in order to get the script on your clipboard

Pre-Merge Checklist

Description Of Changes

Screen.Recording.2023-05-05.at.3.16.32.PM.mov

@cypress
Copy link

cypress bot commented May 5, 2023

Passing run #1785 ↗︎

0 4 0 0 Flakiness 0

Details:

Merge 59c22cc into 2afdfea...
Project: fides Commit: cda9c974fb ℹ️
Status: Passed Duration: 00:46 💡
Started: May 5, 2023 7:34 PM Ended: May 5, 2023 7:34 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@allisonking allisonking marked this pull request as ready for review May 5, 2023 19:37
Copy link
Contributor

@eastandwestwind eastandwestwind left a comment

Choose a reason for hiding this comment

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

This looks good for now, so we're simply requiring the user to replace the {privacy-center-hostname-and-path} with their own.

I like the iterative approach. We'll likely want to add a config form somewhere in admin-ui for the pc url. Something to think about when we add this config is what if a user has multiple PCs across multiple subdomains.

@allisonking
Copy link
Contributor Author

Cypress dashboard appears to be having an issue, but I ran the E2E smoke test locally and everything passed, so I'll merge this now

@allisonking allisonking merged commit 8dd6881 into main May 10, 2023
@allisonking allisonking deleted the aking/3168/js-tag-modal branch May 10, 2023 16:07
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.

Add a modal for copying a JS tag for privacy experiences
2 participants