Skip to content

Commit c3fb3ce

Browse files
authored
release: fixes
- Fix broken dropdown style issue - Add block support in widget area - Add wp alpha color picker support - Fix broken chart layout issue when add long title
2 parents 5445962 + 1dd9a04 commit c3fb3ce

File tree

13 files changed

+29
-9
lines changed

13 files changed

+29
-9
lines changed

classes/Visualizer/Gutenberg/Block.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ public function enqueue_gutenberg_scripts() {
8080
$version = $this->version;
8181
}
8282

83+
if ( ! wp_script_is( 'visualizer-datatables', 'registered' ) ) {
84+
wp_register_script( 'visualizer-datatables', VISUALIZER_ABSURL . 'js/lib/datatables.min.js', array( 'jquery-ui-core' ), Visualizer_Plugin::VERSION );
85+
}
86+
87+
if ( ! wp_style_is( 'visualizer-datatables', 'registered' ) ) {
88+
wp_register_style( 'visualizer-datatables', VISUALIZER_ABSURL . 'css/lib/datatables.min.css', array(), Visualizer_Plugin::VERSION );
89+
}
90+
8391
// Enqueue the bundled block JS file
8492
wp_enqueue_script( 'handsontable', $handsontableJS );
8593
wp_enqueue_script( 'visualizer-gutenberg-block', $blockPath, array( 'wp-api', 'handsontable', 'visualizer-datatables', 'moment' ), $version, true );

classes/Visualizer/Gutenberg/build/block.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/build/block.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/Visualizer/Gutenberg/src/Components/ChartRender.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ChartRender extends Component {
3737

3838
render() {
3939

40-
let chartVersion = google.visualization.Version || 'current';
40+
let chartVersion = 'undefined' !== typeof google ? google.visualization.Version : 'current';
4141

4242
let chart, footer;
4343

classes/Visualizer/Gutenberg/src/Components/ChartSelect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ChartSelect extends Component {
5757

5858
render() {
5959

60-
let chartVersion = google.visualization.Version || 'current';
60+
let chartVersion = 'undefined' !== typeof google ? google.visualization.Version : 'current';
6161

6262
let chart, footer;
6363

classes/Visualizer/Gutenberg/src/Components/Charts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class Charts extends Component {
7474

7575
render() {
7676

77-
let chartVersion = google.visualization.Version || 'current';
77+
let chartVersion = 'undefined' !== typeof google ? google.visualization.Version : 'current';
7878

7979
const { charts, isBusy, chartsLoaded, perPage } = this.state;
8080

classes/Visualizer/Gutenberg/src/style.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,11 @@
378378
z-index: 999999 !important;
379379
}
380380

381+
.components-panel {
382+
.components-select-control {
383+
height:auto !important;
384+
}
385+
}
381386
@media ( min-width: 768px ) {
382387
.visualizer-json-query-modal {
383388
width: 668px;

classes/Visualizer/Render/Sidebar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected static function _renderColorPickerItem( $title, $name, $value, $defaul
309309
echo '<div class="viz-section-item">';
310310
echo '<b>', $title, '</b>';
311311
echo '<div>';
312-
echo '<input type="text" class="color-picker-hex color-picker" data-alpha="true" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Value', 'visualizer' ), '" value="', is_null( $value ) ? $default : esc_attr( $value ), '" data-default-color="', $default, '">';
312+
echo '<input type="text" class="color-picker-hex color-picker" data-alpha-enabled="true" name="', $name, '" maxlength="7" placeholder="', esc_attr__( 'Hex Value', 'visualizer' ), '" value="', is_null( $value ) ? $default : esc_attr( $value ), '" data-default-color="', $default, '">';
313313
echo '</div>';
314314
echo '</div>';
315315
}

css/frame.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ div.viz-group-content .viz-group-description {
370370
padding: 0;
371371
}
372372

373+
#viz-tabs .wp-color-picker {
374+
width: 4rem !important;
375+
}
373376
/******************************************************************************/
374377
/******************************** TOOLBAR ***********************************/
375378
/******************************************************************************/

css/library.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ input:checked + .visualizer-slider:before {
299299
padding-bottom: 5px;
300300
font-weight: bold;
301301
text-align: center;
302+
text-overflow: ellipsis;
303+
white-space: nowrap;
304+
overflow: hidden;
302305
}
303306

304307
div.visualizer-library-form .viz-filter {

0 commit comments

Comments
 (0)