Skip to content

Commit fc5f2c7

Browse files
Merge branch 'development' of github.com:Codeinwp/visualizer into enhancement/pro/343
2 parents 2c45476 + df063a1 commit fc5f2c7

File tree

17 files changed

+327
-120
lines changed

17 files changed

+327
-120
lines changed

.github/ISSUE_TEMPLATE/Bug_report.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Bug report
2+
description: Report a bug so we can get to squashing it.
3+
labels: bug
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for taking the time to fill out this bug report!
9+
- type: textarea
10+
attributes:
11+
label: Description
12+
description: Please write a brief description of the bug, including what you expect to happen and what is currently happening.
13+
placeholder: |
14+
Feature '...' is not working properly. I expect '...' to happen, but '...' happens instead
15+
validations:
16+
required: true
17+
18+
- type: textarea
19+
attributes:
20+
label: Step-by-step reproduction instructions
21+
description: Please write the steps needed to reproduce the bug.
22+
placeholder: |
23+
1. Go to '...'
24+
2. Click on '...'
25+
3. Scroll down to '...'
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
attributes:
31+
label: Screenshots, screen recording, code snippet or Help Scout ticket
32+
description: |
33+
If possible, please upload a screenshot or screen recording which demonstrates the bug.
34+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
35+
Tip: You can include links to customer Help Scout support thread.
36+
validations:
37+
required: false
38+
39+
- type: input
40+
attributes:
41+
label: Environment info
42+
description: |
43+
Please share a https://pastebin.com/ link of your system details by going to site Admin -> Tools -> Site Health -> Info and Copy to Clipboard
44+
placeholder: pastebin.com/ ...
45+
validations:
46+
required: false
47+
48+
- type: dropdown
49+
id: regression
50+
attributes:
51+
label: Is the issue you are reporting a regression
52+
description: |
53+
i.e, a previously working feature/functionality is now broken?
54+
By specifying whether or not your issue is a regression, it will help the development team to more effectively diagnose and resolve the problem.
55+
56+
multiple: false
57+
options:
58+
- 'No'
59+
- 'Yes, this is a regression.'
60+
validations:
61+
required: true
62+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Feature request
2+
description: Suggest a feature that we can implement.
3+
labels: new feature
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: What problem does this address?
8+
description: |
9+
Can you give us a little more insight into this feature request? We'd love to know if it's related to any problems or pain points you've been facing.
10+
If so, can you please let us know what the issue is in a clear and simple way?
11+
Tip: If this is related to a customer request, please add the Help Scout thread URL.
12+
placeholder: |
13+
For example, something like "I find it tough when..." or "I get frustrated because..." would be great.
14+
validations:
15+
required: true
16+
- type: textarea
17+
attributes:
18+
label: What is your proposed solution?
19+
description: Can you please specify the desired feature or improvement and how it resolves the problem mentioned?
20+
validations:
21+
required: false

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
version: 2
3+
updates:
4+
5+
# Maintain dependencies for Composer
6+
- package-ecosystem: "composer"
7+
directory: "/"
8+
target-branch: "development"
9+
schedule:
10+
interval: "weekly"

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
regression:
2+
- '(Yes, this is a regression)'
3+
4+
customer report:
5+
- '(helpscout)'

.github/workflows/issue-labeler.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: "Issue Labeler"
2+
on:
3+
issues:
4+
types: [opened]
5+
6+
jobs:
7+
triage:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: github/issue-labeler@master
11+
with:
12+
repo-token: "${{ secrets.BOT_TOKEN }}"
13+
enable-versioned-regex: 0
14+
configuration-path: .github/labeler.yml

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
##### [Version 3.9.7](https://github.com/Codeinwp/visualizer/compare/v3.9.6...v3.9.7) (2023-03-30)
2+
3+
- Improved chart actions icons
4+
- Updated WordPress core tested up to version
5+
6+
##### [Version 3.9.6](https://github.com/Codeinwp/visualizer/compare/v3.9.5...v3.9.6) (2023-03-20)
7+
8+
- Fixed custom format issue in ChartJS
9+
110
##### [Version 3.9.5](https://github.com/Codeinwp/visualizer/compare/v3.9.4...v3.9.5) (2023-01-30)
211

312
- Improved security by escaping shortcode attribute before render

classes/Visualizer/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
class Visualizer_Plugin {
2929

3030
const NAME = 'visualizer';
31-
const VERSION = '3.9.5';
31+
const VERSION = '3.9.7';
3232

3333
// custom post types
3434
const CPT_VISUALIZER = 'visualizer';

classes/Visualizer/Render/Library.php

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,14 @@ private function _renderLibrary() {
258258
echo '<div class="visualizer-notfound">', esc_html__( 'No charts found', 'visualizer' ), '<p><h2><a href="javascript:;" class="add-new-h2 add-new-chart">', esc_html__( 'Add New', 'visualizer' ), '</a></h2></p></div>';
259259
echo '</div>';
260260
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
261-
echo '<span class="visualizer-chart-action visualizer-nochart-delete"></span>';
262-
echo '<span class="visualizer-chart-action visualizer-nochart-clone"></span>';
263-
echo '<span class="visualizer-chart-action visualizer-nochart-edit"></span>';
264-
echo '<span class="visualizer-chart-action visualizer-nochart-export"></span>';
265-
echo '<span class="visualizer-chart-action visualizer-nochart-shortcode"></span>';
261+
echo '<div class="visualizer-action-group visualizer-nochart">';
262+
echo '<span class="visualizer-chart-action visualizer-nochart-delete"><span class="dashicons dashicons-trash"></span></span>';
263+
echo '<span class="visualizer-chart-action visualizer-nochart-shortcode"><span class="dashicons dashicons-shortcode"></span></span>';
264+
echo '<span class="visualizer-chart-action visualizer-nochart-image"><span class="dashicons dashicons-format-image"></span></span>';
265+
echo '<span class="visualizer-chart-action visualizer-nochart-export"><span class="dashicons dashicons-download"></span></span>';
266+
echo '<span class="visualizer-chart-action visualizer-nochart-clone"><span class="dashicons dashicons-admin-page"></span></span>';
267+
echo '<span class="visualizer-chart-action visualizer-nochart-edit"><span class="dashicons dashicons-admin-generic"></span></span>';
268+
echo '</div>';
266269
echo '</div>';
267270
echo '</div></div>';
268271
$this->_renderSidebar();
@@ -353,15 +356,16 @@ private function _renderChartBox( $placeholder_id, $chart_id, $with_filter = fal
353356
echo '</div>';
354357
}
355358
echo '<div class="visualizer-chart-footer visualizer-clearfix">';
356-
echo '<a class="visualizer-chart-action visualizer-chart-delete" href="', $delete_url, '" title="', esc_attr__( 'Delete', 'visualizer' ), '" onclick="return showNotice.warn();"></a>';
357-
echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '" title="', esc_attr__( 'Clone', 'visualizer' ), '"></a>';
358-
echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" title="', esc_attr__( 'Edit', 'visualizer' ), '" data-chart="', $chart_id, '"></a>';
359-
echo '<a class="visualizer-chart-action visualizer-chart-export" href="javascript:;" title="', esc_attr__( 'Export', 'visualizer' ), '" data-chart="', $export_link, '"></a>';
359+
echo '<div class="visualizer-action-group">';
360+
echo '<a class="visualizer-chart-action visualizer-chart-delete" href="', $delete_url, '" onclick="return showNotice.warn();"><span class="dashicons dashicons-trash"></span><span class="tooltip-text">' . esc_attr__( 'Delete', 'visualizer' ) . '</span></a>';
361+
echo '<a class="visualizer-chart-action visualizer-chart-shortcode" href="javascript:;" data-clipboard-text="', esc_attr( $shortcode ), '"><span class="dashicons dashicons-shortcode"></span><span class="tooltip-text">' . esc_attr__( 'Copy Shortcode', 'visualizer' ) . '</span></a>';
360362
if ( $this->can_chart_have_action( 'image', $chart_id ) ) {
361-
echo '<a class="visualizer-chart-action visualizer-chart-image" href="javascript:;" title="', esc_attr__( 'Download as image', 'visualizer' ), '" data-chart="visualizer-', $chart_id, '" data-chart-title="', $title, '"></a>';
363+
echo '<a class="visualizer-chart-action visualizer-chart-image" href="javascript:;" data-chart="visualizer-', $chart_id, '" data-chart-title="', $title, '"><span class="dashicons dashicons-format-image"></span><span class="tooltip-text">' . esc_attr__( 'Download PNG', 'visualizer' ) . '</span></a>';
362364
}
363-
echo '<a class="visualizer-chart-action visualizer-chart-shortcode" href="javascript:;" title="', esc_attr__( 'Click to copy shortcode', 'visualizer' ), '" data-clipboard-text="', esc_attr( $shortcode ), '"><span class="dashicons dashicons-admin-page"></span></a>';
364-
echo '<span>&nbsp;</span>';
365+
echo '<a class="visualizer-chart-action visualizer-chart-export" href="javascript:;" data-chart="', $export_link, '"><span class="dashicons dashicons-download"></span><span class="tooltip-text">' . esc_attr__( 'Export CSV', 'visualizer' ) . '</span></a>';
366+
echo '<a class="visualizer-chart-action visualizer-chart-clone" href="', $clone_url, '"><span class="dashicons dashicons-admin-page"></span><span class="tooltip-text">' . esc_attr__( 'Duplicate', 'visualizer' ) . '</span></a>';
367+
echo '<a class="visualizer-chart-action visualizer-chart-edit" href="javascript:;" data-chart="', $chart_id, '"><span class="dashicons dashicons-admin-generic"></span><span class="tooltip-text">' . esc_attr__( 'Edit', 'visualizer' ) . '</span></a>';
368+
echo '</div>';
365369
do_action( 'visualizer_chart_languages', $chart_id );
366370
echo '<hr><div class="visualizer-chart-status"><span title="' . __( 'Chart ID', 'visualizer' ) . '">(' . $chart_id . '):</span> <span class="visualizer-date" title="' . __( 'Last Updated', 'visualizer' ) . '">' . $chart_status['date'] . '</span><span class="visualizer-error"><i class="dashicons ' . $chart_status['icon'] . '" data-viz-error="' . esc_attr( str_replace( '"', "'", $chart_status['error'] ) ) . '" title="' . esc_attr( $chart_status['title'] ) . '"></i></span></div>';
367371
echo '</div>';

classes/Visualizer/Render/Sidebar/Type/ChartJS/Pie.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ protected function _renderChartTypeSettings() {
109109
esc_html__( 'If checked, the chart will be rendered as a donut chart.', 'visualizer' )
110110
);
111111

112+
self::_renderTextItem(
113+
esc_html__( 'Number Format', 'visualizer' ),
114+
'format',
115+
isset( $this->format ) ? $this->format : '',
116+
sprintf(
117+
'%s<br><br>%s<br><br>%s',
118+
esc_html__( 'Enter custom format pattern to apply to horizontal axis labels.', 'visualizer' ),
119+
sprintf(
120+
esc_html__( 'For number axis labels, this is a subset of the decimal formatting %1$sICU pattern set%2$s. For instance, $#,###.## will display values $1,234.56 for value 1234.56. Pay attention that if you use #&#37;&#37; percentage format then your values will be multiplied by 100.', 'visualizer' ),
121+
'<a href="http://icu-project.org/apiref/icu4c/classDecimalFormat.html#_details" target="_blank">',
122+
'</a>'
123+
),
124+
sprintf(
125+
esc_html__( 'For date axis labels, this is a subset of the date formatting %1$sICU date and time format%2$s.', 'visualizer' ),
126+
'<a href="https://unicode-org.github.io/icu/userguide/format_parse/datetime/#datetime-format-syntax" target="_blank">',
127+
'</a>'
128+
)
129+
)
130+
);
131+
112132
self::_renderSectionEnd();
113133

114134
self::_renderGroupEnd();

composer.json

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
},
4949
"require-dev": {
5050
"wp-coding-standards/wpcs": "^2.3",
51-
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
51+
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
5252
"phpcompatibility/phpcompatibility-wp": "*"
5353
}
5454
}

0 commit comments

Comments
 (0)