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

feat(admin-form): copy form shortcode to clipboard via button #2602

Closed
8 tasks done
mehul0810 opened this issue Jan 3, 2018 · 1 comment
Closed
8 tasks done

feat(admin-form): copy form shortcode to clipboard via button #2602

mehul0810 opened this issue Jan 3, 2018 · 1 comment
Assignees

Comments

@mehul0810
Copy link
Contributor

mehul0810 commented Jan 3, 2018

User Story

As a user, I want a quick and clean way to copy a shortcode so that the UI is less cluttered and it's easier to copy the shortcode in a single click.

Acceptance Criteria

  • clipboard.js has been registered as an npm dependency.
  • A ShortcodeButton JS class has been created which imports ClipboardJS as a module.
  • The button text reads Copy Shortcode.
  • The tooltip reads [give_form id="#"].
  • On click, the shortcode is copied to clipboard and the tooltip text is updated to read Copied!.
  • One mouseout, the button resets to its initial state.
  • The shortcode field in the admin forms table has been replaced with the new button.
  • The shortcode field in the single form edit screen has been replaced with the new button.

Visuals

Visual reference of the shortcode button in WPBR:

image

Replace these shortcode fields with new shortcode button:

image

image

Related

https://clipboardjs.com/

@DevinWalker DevinWalker added this to the 2.0.2 milestone Jan 3, 2018
@ravinderk ravinderk modified the milestones: 2.0.2, 2.2 Jan 28, 2018
@DevinWalker DevinWalker removed this from the 2.2 milestone Mar 6, 2018
@kevinwhoffman kevinwhoffman changed the title Improvement with copying donation form shortcode feat(admin-form): copy form shortcode to clipboard via button Mar 12, 2018
@kevinwhoffman
Copy link
Contributor

@Sidsector9 I have implemented this functionality in WP Business Reviews using clipboard.js and Hint.css. Use the work done in WPBR as your starting point.

Let's do a call on this when you are ready to begin.

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

No branches or pull requests

5 participants