From f56181baf7cfaf03cc71664bf6fce64e8c1f557c Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Mon, 16 Mar 2026 19:30:08 +0530 Subject: [PATCH 1/2] feat: improve import from WordPress and database UX with stepped flow - Rename "Create Filter"/"Create Query" buttons to "1. Choose Data Source" - Add "2. Set Sync Schedule" accordion toggle (always visible, animated chevron) - Move schedule selector under step-2 toggle for cleaner stepped UX --- classes/Visualizer/Render/Layout.php | 124 ++++++++++++++++----------- css/frame.css | 42 +++++++++ js/frame.js | 7 ++ 3 files changed, 124 insertions(+), 49 deletions(-) diff --git a/classes/Visualizer/Render/Layout.php b/classes/Visualizer/Render/Layout.php index 3fbb4d2a..8d935136 100644 --- a/classes/Visualizer/Render/Layout.php +++ b/classes/Visualizer/Render/Layout.php @@ -884,7 +884,7 @@ public static function _renderTabBasic( $args ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison $extra = self::is_hour_selected( $hours, $num ) ? 'selected' : ''; ?> - + - + ); ?> -
  • +
  • -
    -

    - - - + + + + +
    + + +
    @@ -1138,7 +1151,7 @@ class="dashicons dashicons-lock"> foreach ( $schedules as $num => $name ) { $extra = self::is_hour_selected( $hours, $num ) ? 'selected' : ''; ?> - + ); ?> -
  • +
  • -
    -

    - + + + - - + +
    + + +
    diff --git a/css/frame.css b/css/frame.css index 1d36c989..9d72ec36 100644 --- a/css/frame.css +++ b/css/frame.css @@ -1016,6 +1016,48 @@ button#editor-chart-button { text-align: center; } +/* Import steps — stepped data-source + schedule flow */ +.vz-import-step-btn { + width: 100%; + margin-bottom: 4px !important; + text-align: left; +} + +.vz-import-step-toggle { + display: flex; + justify-content: space-between; + align-items: center; + width: 100%; + margin: 0; + padding: 5px 10px; + background: #f0f0f1; + border: 1px solid #c3c4c7; + border-radius: 2px; + cursor: pointer; + font-size: 13px; + color: #50575e; + line-height: 2; +} + +.vz-import-step-toggle:hover { + background: #e5e5e5; + border-color: #a7aaad; +} + +.vz-import-step-toggle .dashicons { + transition: transform 0.2s ease; + flex-shrink: 0; +} + +.vz-import-step-toggle[aria-expanded="true"] .dashicons { + transform: rotate(180deg); +} + +#vz-wp-sync-options, +#vz-db-sync-options { + padding-top: 8px; +} + #sidebar { border-left: 1px solid #ddd; background: #f3f3f3; diff --git a/js/frame.js b/js/frame.js index 592244d8..45b29b4e 100644 --- a/js/frame.js +++ b/js/frame.js @@ -445,6 +445,13 @@ } } ); + $( document ).on( 'click', '#vz-db-sync-btn', function(){ + var $options = $( '#vz-db-sync-options' ); + var isOpen = $options.is( ':visible' ); + $options.toggle(); + $( this ).attr( 'aria-expanded', ! isOpen ); + } ); + $( '#db-chart-save-button' ).on( 'click', function(){ // submit only if a query has been provided. if($('#db-query-form .visualizer-db-query').val().length > 0){ From e41d7d60c356be77d5a4c8a1fa942831039a784d Mon Sep 17 00:00:00 2001 From: Hardeep Asrani Date: Tue, 17 Mar 2026 16:33:38 +0530 Subject: [PATCH 2/2] fix: qa issues --- classes/Visualizer/Render/Layout.php | 6 +++--- js/frame.js | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/classes/Visualizer/Render/Layout.php b/classes/Visualizer/Render/Layout.php index 8d935136..8a337f01 100644 --- a/classes/Visualizer/Render/Layout.php +++ b/classes/Visualizer/Render/Layout.php @@ -1049,7 +1049,7 @@ class="dashicons dashicons-lock"> @@ -1058,7 +1058,7 @@ class="dashicons dashicons-lock">