GravityKit/GravityView

Layout Selector Disappears in GravityView Under Certain Conditions

Mwalek opened this issue · 2 comments

When creating a View in GravityView, the layout selector disappears under two specific scenarios, which should not occur:

  1. Scenario 1:

    • When creating a new View, if a title is given, a form is selected to connect to the View, and the changes are saved without selecting a layout type, the layout selector is not visible the next time the View is edited.
  2. Scenario 2:

    • When creating a new View, a form is selected, and a layout type that can be deactivated or uninstalled (e.g., DataViews Layout) is chosen. If the layout is later deactivated or uninstalled, the layout selector does not appear when the View is edited again.

In both scenarios, the layout selection area should always be visible when editing a View.

Prerequisites:

Activate DataTables Layout: The issue only occurs when DataTables Layout is active.

Steps to Reproduce:

Scenario 1:

  1. Create a new View in GravityView.
  2. Enter a title for the View.
  3. Select a form to connect to the View.
  4. Save the changes without selecting a layout type.
  5. Edit the View again.

Scenario 2:

  1. Create a new View in GravityView.
  2. Select a form to connect to the View.
  3. Choose a layout type that can be deactivated or uninstalled (e.g., DataViews Layout).
  4. Deactivate or uninstall the selected layout.
  5. Edit the View again.

Expected Behavior:

The layout selector should always be visible when editing a View, regardless of whether a layout type was previously selected or if the chosen layout was later deactivated or uninstalled.

Actual Behavior:

In both scenarios described above, the layout selector is not visible when editing the View.

Screenshot 2024-08-21 at 19-36-58 Edit View “Anfang” ‹ 1gk-qa — WordPress

This seems similar to this other issue: https://github.com/GravityKit/DataTables/issues/230 which is already merged in DataTables but not yet released: https://github.com/GravityKit/DataTables/pull/231

Closing as duplicate ...