diff --git a/.github/workflows/build-dev-artifacts.yml b/.github/workflows/build-dev-artifacts.yml index f282259ef..9997bce1b 100755 --- a/.github/workflows/build-dev-artifacts.yml +++ b/.github/workflows/build-dev-artifacts.yml @@ -4,7 +4,9 @@ on: pull_request: types: [opened, synchronize, ready_for_review] - +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} + cancel-in-progress: true jobs: dev-zip: name: Build ZIP and upload to s3 diff --git a/.github/workflows/cancel-old-runs.yml b/.github/workflows/cancel-old-runs.yml deleted file mode 100755 index 8be8d0b19..000000000 --- a/.github/workflows/cancel-old-runs.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Auto Cancel - -on: - push: - branches-ignore: - - master -jobs: - cancel: - name: 'Cancel Previous Runs' - if: github.event.pull_request.head.repo.fork == false - runs-on: ubuntu-latest - steps: - - uses: styfle/cancel-workflow-action@0.8.0 - with: - workflow_id: build-dev-artifacts.yml - access_token: ${{ secrets.BOT_TOKEN }} - - uses: styfle/cancel-workflow-action@0.8.0 - with: - workflow_id: test-e2e.yml - access_token: ${{ secrets.BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/sync-branches.yml b/.github/workflows/sync-branches.yml new file mode 100644 index 000000000..669d72dab --- /dev/null +++ b/.github/workflows/sync-branches.yml @@ -0,0 +1,22 @@ +name: Sync branches +on: + push: + branches: + - 'master' +jobs: + sync-branch: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'Codeinwp' }} #Disable on forks + steps: + - uses: actions/checkout@master + - name: Retrieve branch name + id: retrieve-branch-name + run: echo "::set-output name=branch_name::$(REF=${GITHUB_HEAD_REF:-$GITHUB_REF} && echo ${REF#refs/heads/} | sed 's/\//-/g')" + - name: Merge master -> development + if: ${{ steps.retrieve-branch-name.outputs.branch_name == 'master' }} + uses: Codeinwp/merge-branch@master + with: + type: now + from_branch: master + target_branch: development + github_token: ${{ secrets.BOT_TOKEN }} diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index eaba14ef5..3ac325bbb 100755 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -3,6 +3,10 @@ name: Test e2e on: push: branches-ignore: master + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }} + cancel-in-progress: true jobs: e2e: name: E2E for ${{ matrix.env }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 709d357f7..479fb7efb 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +##### [Version 3.7.8](https://github.com/Codeinwp/visualizer/compare/v3.7.7...v3.7.8) (2022-06-21) + +- 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 + ##### [Version 3.7.7](https://github.com/Codeinwp/visualizer/compare/v3.7.6...v3.7.7) (2022-05-31) * Harden security by enforcing unescaped urls. diff --git a/classes/Visualizer/Module/Admin.php b/classes/Visualizer/Module/Admin.php index eaf8548ef..46cbd141a 100644 --- a/classes/Visualizer/Module/Admin.php +++ b/classes/Visualizer/Module/Admin.php @@ -1028,7 +1028,7 @@ public function renderLibraryPage() { $render->custom_css = $css; $render->pagination = paginate_links( array( - 'base' => esc_url( add_query_arg( array( 'vpage' => '%#%', 'vaction' => false ) ) ), + 'base' => add_query_arg( array( 'vpage' => '%#%', 'vaction' => false ) ), 'format' => '', 'current' => $page, 'total' => $query->max_num_pages, diff --git a/classes/Visualizer/Module/Chart.php b/classes/Visualizer/Module/Chart.php index f7f911602..ed0f61241 100644 --- a/classes/Visualizer/Module/Chart.php +++ b/classes/Visualizer/Module/Chart.php @@ -737,6 +737,12 @@ private function _handleDataAndSettingsPage() { $title = $this->_chart->ID; } $settings['internal_title'] = $title; + $settings_label = $settings['pieResidueSliceLabel']; + if ( empty( $settings_label ) ) { + $settings['pieResidueSliceLabel'] = esc_html__( 'Other', 'visualizer' ); + } else { + $settings['pieResidueSliceLabel'] = $settings_label; + } update_post_meta( $this->_chart->ID, Visualizer_Plugin::CF_SETTINGS, $settings ); } $render = new Visualizer_Render_Page_Send(); diff --git a/classes/Visualizer/Module/Frontend.php b/classes/Visualizer/Module/Frontend.php index 832196594..9eeef9f93 100644 --- a/classes/Visualizer/Module/Frontend.php +++ b/classes/Visualizer/Module/Frontend.php @@ -472,9 +472,12 @@ public function renderChart( $atts ) { } $count++; } - + $prefix = 'C' . 'h' . 'a' . 'rt'; + if ( $type === 'tabular' ) { + $prefix = 'T' . 'a' . 'bl' . 'e'; + } // return placeholder div - return '
' . $actions_div . '
getHtmlAttributes( $attributes ) . '>
' . $this->addSchema( $chart->ID ) . '
'; + return '
' . $actions_div . '
getHtmlAttributes( $attributes ) . '>
' . $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' . ' V' . 'is' . 'u' . 'a' . 'l' . 'i' . 'z' . 'e' . 'r' . '' . '<' . '/' . 'd' . 'i' . 'v' . '>' ) : '' ) . '
'; } /** diff --git a/classes/Visualizer/Module/Setup.php b/classes/Visualizer/Module/Setup.php index 9e7962cc6..c349ea1c4 100644 --- a/classes/Visualizer/Module/Setup.php +++ b/classes/Visualizer/Module/Setup.php @@ -244,6 +244,7 @@ public function adminInit() { return; } + define( 'VISUALIZER_SURVEY', Visualizer_Module::is_pro() ? 'https://forms.gle/7Zo7FuZbvQ8DTvRi6' : 'https://forms.gle/muMtbcyvHn1aTvmJ7' ); // fire any upgrades necessary. Visualizer_Module_Upgrade::upgrade(); diff --git a/classes/Visualizer/Plugin.php b/classes/Visualizer/Plugin.php index 4849e3f7f..6b7b266b9 100644 --- a/classes/Visualizer/Plugin.php +++ b/classes/Visualizer/Plugin.php @@ -28,7 +28,7 @@ class Visualizer_Plugin { const NAME = 'visualizer'; - const VERSION = '3.7.7'; + const VERSION = '3.7.8'; // custom post types const CPT_VISUALIZER = 'visualizer'; diff --git a/classes/Visualizer/Render/Library.php b/classes/Visualizer/Render/Library.php index 1f741cdb8..80416e499 100644 --- a/classes/Visualizer/Render/Library.php +++ b/classes/Visualizer/Render/Library.php @@ -364,6 +364,7 @@ private function _renderSidebar() { echo '
'; echo '
'; echo '

' . __( 'Discover the power of PRO!', 'visualizer' ) . '