pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.06k stars 265 forks source link

Add copy button to field slugs to make it easier to copy/paste #7291

Closed heybran closed 2 weeks ago

heybran commented 2 months ago

Description

Add a new CopyButton react component to be used along with field name. It allows user to copy the field name, and keyboard support styles are also considered.

Related GitHub issue(s)

7237

Testing instructions

  1. Go to Edit Pods screen
  2. Hover over field name or using keyboard to navigate to field wrapper, Copy Button (currently displayed as copy icon) should be visible and clickable.
  3. Click copy button and the field name should be copied to your clipboard.

Screenshots / screencast

https://github.com/pods-framework/pods/assets/75633537/40985757-0cd5-485a-95e5-4609fa4d5682

Using keyboard to copy field name.

https://github.com/pods-framework/pods/assets/75633537/5bc49bd1-b1b8-4044-a236-02f2904d9186

Changelog text for these changes

Enhancement: Pods field name will now have a copy button near it to copy field name(slug). #7237 (@heybran)

PR checklist

heybran commented 2 months ago

@sc0ttkclark

You'll see lots of changes on this file: https://github.com/pods-framework/pods/pull/7291/files#diff-95ad6580fe94f4558f5fbc01ba5a4cf11a162c41f486d86cb203f0d024d11e5e

That is due to I run pnpm run format-js, will that be ok? If not, I can manually change them back to its original format.

what-the-diff[bot] commented 2 weeks ago

PR Summary