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

Select different layouts for multiple and single entry (per-context switcher) #1996

Closed doekenorg closed 1 month ago

doekenorg commented 4 months ago

Things to test:

Testing different states

Browser test

Check appearance, confirm functionality in:


This PR addresses #1177.

It adds a new dropdown solution with support for icons and descriptions. It also adds a new variable that contains a separate template for the single entry. There is backwards compatibility as the value of the new variable has a fallback to the "old" variable, that is now solely for the multiple entries.

pr-preview

Todo:

In the meantime this can be tested and reviewed for what we have now.

image

💾 Build file (18613244e).

zackkatz commented 4 months ago

Hey @doekenorg, I had a chance to review. I encountered a few issues:

Thanks 👍

doekenorg commented 4 months ago

@zackkatz I looked into your issues with the CSS, but I cannot reproduce this in any browser. It all just works properly.

The only way I can reproduce is to manually set an overflow: hidden of auto on the box that holds your popup. This makes me believe you might have a piece of custom css that I don't have. Whenever possible I'd like to look at it together so we can pinpoint where that comes from. Let me know when you are available.

Fixed the other two things.

zackkatz commented 2 months ago

@doekenorg Hey, can you please update to the new designs?

doekenorg commented 2 months ago

@zackkatz the new designs are in.

I'm not sure how buy now is supposed to work. Does that exist in the current settings block. I have not seen that.

crbdev commented 2 months ago

Here are my notes from testing this PR. Besides the issues highlighted below and the things not yet tested, everything else works well.

1. Updating existing Views and creating new Views

Using the combination of DataTables Table for the MEL and List for the SEL causes a warning message to appear when navigating to the SEL on the front end: "The Single Entry layout has not been configured".

Steps to reproduce:

This also happens when editing an existing View I didn't enounter any issues with other layout combinations

2. Installing or activating layouts from inside the View switcher

To be clear, this works! I only have a suggestion. When installing or activating layouts, there is a spinner on the cursor while the layout is installed or activated. However, this spinner disappears if you hover over another layout choice. Other layouts are still clickable while this is happening. So, if you move your cursor, it's not clear that anything is actually happening. Maybe we should make it more clear that something is happening, and/or not have the other layouts clickable while this is process is occuring?

3. The Maps layout

Possibly another discussion but I wonder if we want the Maps layout available at all? After all, it is most useful as a widget. Moreover, for the Single Entry Layout, the "Maps (Default)" option is the same as the List layout as far as I can tell, so we could consider removing it as an option there?

Things not tested

doekenorg commented 2 months ago
zackkatz commented 1 month ago

@doekenorg Here's a video showing what Casey wrote.

https://www.loom.com/share/012f831a2579436d9d4ed705d4e9361b

doekenorg commented 1 month ago

@doekenorg Here's a video showing what Casey wrote.

https://www.loom.com/share/012f831a2579436d9d4ed705d4e9361b

Sorry, I forgot to mention, but you need https://github.com/GravityKit/DataTables/pull/221 this Datatables plugin to fix that :-)

zackkatz commented 1 month ago

Ah, that works now! Thanks @doekenorg!

zackkatz commented 1 month ago

@doekenorg We're getting close! Just a few more items:

doekenorg commented 1 month ago

@zackkatz what do you mean with: Make sure it works with View Presets ?

And on the gv_switch_view_button. I understand, but I actually specifically did not touch this to avoid this whole mess of cleaning it up. Especially with the revamp the view editor coming up. I mean, I can invest the time; but it's already a hidden button right?

rafaehlers commented 1 month ago
crbdev commented 1 month ago

Here's what I would propose, as an example: /?utm_campaign=gk_upsells&utm_source=view-editor&utm_content=diy

UTM sheet for reference https://docs.google.com/spreadsheets/d/15oBygotBeX1TT_5Q-5L9Eslmh8EyWrqU1hn-6CT1i34/edit#gid=0

doekenorg commented 1 month ago
  • [ ] Add UTM tracking links to all "Buy Now" buttons

Here's what I would propose, as an example: /?utm_campaign=gk_upsells&utm_source=view-editor&utm_content=diy

UTM sheet for reference https://docs.google.com/spreadsheets/d/15oBygotBeX1TT_5Q-5L9Eslmh8EyWrqU1hn-6CT1i34/edit#gid=0

@crbdev I changed it to https://www.gravitykit.com/pricing/?utm_campaign=gk_upsells&utm_source=view-editor&utm_content=upgrade because the upgrades are combined into a new section with a single "upgrade" button. Is that ok?

doekenorg commented 1 month ago

Found a bug:

crbdev commented 1 month ago

On the "Views" page, the "Template" column only shows the layout being used on the multiple entry page, should we update this to reflect the layout being used on both the multiple and single entry pages?

e.g. 👇

CleanShot 2024-05-27 at 10 30 12@2x

doekenorg commented 1 month ago

@crbdev done

If both are the same template, it will just show "Table" or "List" and not "Table / Table".

image