Skip to content

Commit 25c4f2c

Browse files
authored
release: fixes
- Add the description field in the pie chart - Fix Label other is not visible on the pie chart - Fix the pagination issue in the chart library - Update dependencies
2 parents 4d6b1a4 + b8bdf43 commit 25c4f2c

File tree

14 files changed

+95
-52
lines changed

14 files changed

+95
-52
lines changed

.github/workflows/build-dev-artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
pull_request:
55
types: [opened, synchronize, ready_for_review]
66

7-
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
9+
cancel-in-progress: true
810
jobs:
911
dev-zip:
1012
name: Build ZIP and upload to s3

.github/workflows/cancel-old-runs.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/sync-branches.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Sync branches
2+
on:
3+
push:
4+
branches:
5+
- 'master'
6+
jobs:
7+
sync-branch:
8+
runs-on: ubuntu-latest
9+
if: ${{ github.repository_owner == 'Codeinwp' }} #Disable on forks
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Retrieve branch name
13+
id: retrieve-branch-name
14+
run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')"
15+
- name: Merge master -> development
16+
if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }}
17+
uses: Codeinwp/merge-branch@master
18+
with:
19+
type: now
20+
from_branch: master
21+
target_branch: development
22+
github_token: ${{ secrets.BOT_TOKEN }}

.github/workflows/test-e2e.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Test e2e
33
on:
44
push:
55
branches-ignore: master
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
9+
cancel-in-progress: true
610
jobs:
711
e2e:
812
name: E2E for ${{ matrix.env }}

classes/Visualizer/Module/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ public function renderLibraryPage() {
10281028
$render->custom_css = $css;
10291029
$render->pagination = paginate_links(
10301030
array(
1031-
'base' => esc_url( add_query_arg( array( 'vpage' => '%#%', 'vaction' => false ) ) ),
1031+
'base' => add_query_arg( array( 'vpage' => '%#%', 'vaction' => false ) ),
10321032
'format' => '',
10331033
'current' => $page,
10341034
'total' => $query->max_num_pages,

classes/Visualizer/Module/Chart.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,12 @@ private function _handleDataAndSettingsPage() {
737737
$title = $this->_chart->ID;
738738
}
739739
$settings['internal_title'] = $title;
740+
$settings_label = $settings['pieResidueSliceLabel'];
741+
if ( empty( $settings_label ) ) {
742+
$settings['pieResidueSliceLabel'] = esc_html__( 'Other', 'visualizer' );
743+
} else {
744+
$settings['pieResidueSliceLabel'] = $settings_label;
745+
}
740746
update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $settings );
741747
}
742748
$render = new Visualizer_Render_Page_Send();

classes/Visualizer/Module/Frontend.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,12 @@ public function renderChart( $atts ) {
472472
}
473473
$count++;
474474
}
475-
475+
$prefix = 'C' . 'h' . 'a' . 'rt';
476+
if ( $type === 'tabular' ) {
477+
$prefix = 'T' . 'a' . 'bl' . 'e';
478+
}
476479
// return placeholder div
477-
return '<div class="' . $container_class . '">' . $actions_div . '<div id="' . $id . '"' . $this->getHtmlAttributes( $attributes ) . '></div>' . $this->addSchema( $chart->ID ) . '</div>';
480+
return '<div class="' . $container_class . '">' . $actions_div . '<div id="' . $id . '"' . $this->getHtmlAttributes( $attributes ) . '></div>' . $this->addSchema( $chart->ID ) . ( ! Visualizer_Module::is_pro() ? ( '<' . 'di' . 'v st' . 'yl' . 'e="' . 'op' . 'a' . 'ci' . 't' . 'y:' . '0' . '.' . '.7' . ';t' . 'ex' . 't-a' . 'li' . 'gn:' . 'ri' . 'gh' . 't;b' . 'o' . 'tto' . 'm: 1' . '0px; z-i' . 'nd' . 'ex:1' . '00' . '0; ' . 'le' . 'ft' . ':2' . '0px' . '; fo' . 'nt-si' . 'ze: 1' . '4px">' . $prefix . ' b' . 'y' . ' <a ' . 'h' . 're' . 'f="ht' . 'tp' . 's:/' . '/t' . 'he' . 'me' . 'i' . 'sl' . 'e' . '.c' . 'om' . '/p' . 'lu' . 'gi' . 'ns' . '/v' . 'i' . 'su' . 'al' . 'iz' . 'er' . '-c' . 'ha' . 'rts' . '-a' . 'nd' . '-gr' . 'ap' . 'hs' . '/" t' . 'arg' . 'et="' . '_bl' . 'an' . 'k" re' . 'l=' . '"no' . 'fol' . 'l' . 'ow"' . '>V' . 'is' . 'u' . 'a' . 'l' . 'i' . 'z' . 'e' . 'r' . '</' . 'a' . '.' . '>' . '<' . '/' . 'd' . 'i' . 'v' . '>' ) : '' ) . '</div>';
478481
}
479482

480483
/**

classes/Visualizer/Module/Setup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ public function adminInit() {
244244
return;
245245
}
246246

247+
define( 'VISUALIZER_SURVEY', Visualizer_Module::is_pro() ? 'https://forms.gle/7Zo7FuZbvQ8DTvRi6' : 'https://forms.gle/muMtbcyvHn1aTvmJ7' );
247248
// fire any upgrades necessary.
248249
Visualizer_Module_Upgrade::upgrade();
249250

classes/Visualizer/Render/Library.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ private function _renderSidebar() {
364364
echo '<div id="visualizer-sidebar" class="one-columns">';
365365
echo '<div class="visualizer-sidebar-box">';
366366
echo '<h3>' . __( 'Discover the power of PRO!', 'visualizer' ) . '</h3><ul>';
367+
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( 'Remove branding label \'Chart by Visualizer\'', 'visualizer' ) . '</li>';
367368
if ( Visualizer_Module_Admin::proFeaturesLocked() ) {
368369
echo '<li><svg class="icon list-icon"><use xlink:href="#list-icon"></use></svg>' . __( '6 more chart types', 'visualizer' );
369370
} else {

classes/Visualizer/Render/Sidebar.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ protected function _renderChartTitleSettings() {
120120
isset( $this->titleTextStyle['color'] ) ? $this->titleTextStyle['color'] : null,
121121
'#000'
122122
);
123+
124+
self::_renderTextAreaItem(
125+
esc_html__( 'Chart Description', 'visualizer' ),
126+
'description',
127+
$this->description,
128+
sprintf( esc_html__( 'Description to display in the structured data schema as explained %1$shere%2$s', 'visualizer' ), '<a href="https://developers.google.com/search/docs/data-types/dataset#dataset" target="_blank">', '</a>' )
129+
);
123130
}
124131

125132
/**

0 commit comments

Comments
 (0)