GravityKit / GravityView

The best and easiest way to display Gravity Forms entries on your website.
https://www.gravitykit.com/products/gravityview/
245 stars 62 forks source link

Duplication & inserting between fields #2025

Closed doekenorg closed 2 months ago

doekenorg commented 3 months ago

This PR adresses #2019.

It add's a duplication button once you hover a field or widget. Clicking it will duplicate the field and copy over all the values and settings of the originating field. It will add the field directly under the field that is being duplicated.

duplicate

Bonus: Insert fields between others

After building the previous feature, I figured it would be very powerful to be able to inject fields in a specific place.

insert-between

doekenorg commented 3 months ago

@zackkatz could you check the unit tests changes I made. This fixes the tests 🤞 but I have no clue what is being tested here. Only thing I know is that the shortcode tag is missing which returns a WP_Error. I had this failing test locally for a while; but in CI it always worked.

mrcasual commented 3 months ago

@doekenorg, the reason why the test was passing in CI is because we use the latest (non-beta/alpha) WordPress Develop release, which was 6.4.3 until April 2. This commit, introduced in 6.5, broke things. Your fix looks good IMHO.

doekenorg commented 3 months ago

@mrcasual right, no semver for WordPress. Thanks for clarifying. I should keep a closer eye on WordPress releases with regards to possible breaking changes.

mrcasual commented 3 months ago

@doekenorg, are you able to make duplication work using keyboard when you tab through focusable inputs?

doekenorg commented 3 months ago

@mrcasual yeah possibly

doekenorg commented 2 months ago

@mrcasual done. I took some time to see if I could move the popup to that position; but jQuery UI does not have the appropriate hooks for that. So that's for the redesign.

zackkatz commented 2 months ago

@doekenorg Thanks for the PR! Can you please check out the video? Thanks 👍

crbdev commented 2 months ago

It appears to me that the "+" icon is slightly off center. Not sure if that's intentional or a screen size thing or something :) Just thought I would highlight it.

CleanShot 2024-04-12 at 15 37 13@2x

doekenorg commented 2 months ago

@crbdev Good eye! The icon needed to be offset half its with to the left to be centered. It is "text" and it is aligned in the center. So it starts from the center, making it slightly offset to the right :-D Fixed.