Skip to content
Open

Release #1268

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f95af98
Sync branch [skip ci]
pirate-bot Mar 4, 2026
e489b4a
fix(dev): update action's node version
HardeepAsrani Mar 4, 2026
fb16a74
Sync branch [skip ci]
pirate-bot Mar 4, 2026
13b7677
Sync branch [skip ci]
pirate-bot Mar 4, 2026
5618340
fix: small drop-downs can't be closed
HardeepAsrani Mar 9, 2026
5101ede
fix: bubble chart crash on window resize with named series in manual …
HardeepAsrani Mar 10, 2026
184ae3e
fix: prevent double clipboard alert on copy action (#1265)
HardeepAsrani Mar 10, 2026
57a71e7
fix: resolve intermittent sidebar scroll failure in Chrome (#1264)
HardeepAsrani Mar 10, 2026
5e9cea6
fix: visualizer getCSV method throwing constant errors (#1263)
HardeepAsrani Mar 10, 2026
1d599d3
fix: fatal error on servers with broken FTP filesystem configuration …
HardeepAsrani Mar 10, 2026
5da3eeb
fix: manual config not working for ChartJS charts (#1257)
HardeepAsrani Mar 10, 2026
e897a39
fix: visibility of block method
HardeepAsrani Mar 10, 2026
877ac5a
chore(deps-dev): bump phpstan/phpstan from 2.1.22 to 2.1.33 (#1243)
dependabot[bot] Mar 10, 2026
03eeef7
chore(deps-dev): bump phpcompatibility/phpcompatibility-wp (#1236)
dependabot[bot] Mar 10, 2026
cec8e3a
chore(deps-dev): bump szepeviktor/phpstan-wordpress from 2.0.2 to 2.0…
dependabot[bot] Mar 10, 2026
91610bd
chore(deps-dev): bump wp-coding-standards/wpcs from 2.3.0 to 3.3.0 (#…
dependabot[bot] Mar 10, 2026
d693f16
chore: update agents.md
HardeepAsrani Mar 12, 2026
94f9316
chore(dev): add translation workflow
HardeepAsrani Mar 13, 2026
71156c2
Sync branch [skip ci]
pirate-bot Mar 16, 2026
218e07e
fix: guard against undefined properties on license object in Library …
HardeepAsrani Mar 16, 2026
9f4d52e
fix: hide 'Show Chart' reminder message when in chart view mode (#1270)
HardeepAsrani Mar 16, 2026
a6a9328
fix: remove legacy DataTable class and hide pagination options when d…
HardeepAsrani Mar 16, 2026
1173551
fix: catch invalid Google Charts format patterns and show i18n error …
HardeepAsrani Mar 16, 2026
f70d446
chore: add doc link to upsells
HardeepAsrani Mar 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build-dev-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ jobs:
run: |
composer install --no-dev --prefer-dist --no-progress
- name: Create zip
run: npm run dist
run: |
npm ci
CURRENT_VERSION=$(node -p -e "require('./package.json').version")
COMMIT_HASH=$(git rev-parse --short HEAD)
DEV_VERSION="${CURRENT_VERSION}-dev.${COMMIT_HASH}"
npm run grunt version::${DEV_VERSION}
npm run dist
- 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')"
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Translations Diff

on:
pull_request_review:
pull_request:
types: [opened, edited, synchronize, ready_for_review]
branches:
- development
- master

jobs:
translation:
runs-on: ubuntu-latest
steps:
- name: Checkout Base Branch
uses: actions/checkout@master
with:
ref: ${{ github.base_ref }}
path: visualizer-base
- name: Setup node 22
uses: actions/setup-node@v6
with:
node-version: 22.x
- name: Checkout PR Branch (Head)
uses: actions/checkout@master
with:
path: visualizer-head
- name: Build POT for PR Branch
run: |
chmod +x ./visualizer-head/bin/make-pot.sh
./visualizer-head/bin/make-pot.sh ./visualizer-head ./visualizer-head/languages/visualizer.pot
ls ./visualizer-head/languages/
- name: Build POT for Base Branch
run: |
./visualizer-head/bin/make-pot.sh ./visualizer-base ./visualizer-base/languages/visualizer.pot
ls ./visualizer-base/languages/
- name: Compare POT files
uses: Codeinwp/action-i18n-string-reviewer@main
with:
fail-on-changes: "false"
openrouter-key: ${{ secrets.OPEN_ROUTER_API_KEY }}
openrouter-model: "google/gemini-2.5-flash"
base-pot-file: "visualizer-base/languages/visualizer.pot"
target-pot-file: "visualizer-head/languages/visualizer.pot"
github-token: ${{ secrets.BOT_TOKEN }}
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#6.5.0",
"core": null,
"phpVersion": "7.4",
"plugins": ["."],
"themes": [],
Expand Down
27 changes: 22 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,31 @@ npm run dev # Watch mode for development
```

### E2E Tests & Environment

Requires Docker to be running. Uses `docker-compose.ci.yml` (MariaDB + WordPress on port 8889).

```bash
npm install # Install root-level JS dependencies
npm run test:env:start # Start wp-env WordPress environment
npm run test:env:stop # Stop wp-env
npm run test:e2e:playwright # Run Playwright E2E tests
npm run test:e2e:playwright:debug # Playwright UI debug mode
# 1. Install dependencies
npm ci
npx playwright install --with-deps chromium
composer install --no-dev

# 2. Start the WordPress environment (boots Docker, installs WP, activates plugin)
DOCKER_FILE=docker-compose.ci.yml bash bin/wp-init.sh

# 3. Run the full Playwright suite
npm run test:e2e:playwright

# 4. Run a single spec file
npx wp-scripts test-playwright --config tests/e2e/playwright.config.js tests/e2e/specs/gutenberg-editor.spec.js

# 5. Tear down
DOCKER_FILE=docker-compose.ci.yml bash bin/wp-down.sh
```

WordPress is installed at `http://localhost:8889` with credentials `admin` / `password`.
The `TI_E2E_TESTING` constant is set to `true` in `wp-config.php` by the setup script, which enables test-only code paths in the plugin.

---

## Architecture Overview
Expand Down
47 changes: 47 additions & 0 deletions bin/make-pot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# Script to generate POT file via Docker
# Usage: ./bin/make-pot.sh [plugin-path] [destination-path]

# Set defaults
PLUGIN_PATH="${1:-.}"
DESTINATION="${2:-.}"

# Resolve absolute paths
PLUGIN_PATH="$(cd "$PLUGIN_PATH" 2>/dev/null && pwd)" || {
echo "Error: Plugin path '$1' does not exist"
exit 1
}

DESTINATION="$(cd "$(dirname "$DESTINATION")" 2>/dev/null && pwd)/$(basename "$DESTINATION")" || {
echo "Error: Unable to resolve destination path"
exit 1
}

# Extract destination filename and directory
DEST_DIR="$(dirname "$DESTINATION")"
DEST_FILE="$(basename "$DESTINATION")"

# Ensure destination directory exists
mkdir -p "$DEST_DIR"

echo "Generating POT file..."
echo "Plugin Path: $PLUGIN_PATH"
echo "Destination: $DESTINATION"
echo ""

# Run Docker container with wp-cli to generate POT
docker run --user root --rm \
--volume "$PLUGIN_PATH:/var/www/html/plugin" \
wordpress:cli \
bash -c 'php -d memory_limit=512M "$(which wp)" --version --allow-root && wp i18n make-pot plugin ./plugin/languages/'"$DEST_FILE"' --include=admin,includes,libs,assets,views --allow-root --domain=anti-spam'

# Check if the file was created inside the container
if [ $? -eq 0 ]; then
echo ""
echo "✓ POT file successfully generated at: $DESTINATION"
else
echo ""
echo "✗ Error generating POT file"
exit 1
fi
14 changes: 7 additions & 7 deletions classes/Visualizer/Gutenberg/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,7 @@ public function gutenberg_block_callback( $atts ) {
return '';
}

// phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
if ( $atts['lazy'] == -1 || $atts['lazy'] == false ) {
if ( $atts['lazy'] === '-1' || $atts['lazy'] === false ) {
$atts['lazy'] = 'no';
}

Expand Down Expand Up @@ -472,11 +471,12 @@ public function get_visualizer_data( $post ) {
$permissions = get_post_meta( $post_id, Visualizer_Pro::CF_PERMISSIONS, true );

if ( empty( $permissions ) ) {
$permissions = array( 'permissions' => array(
$permissions = array(
'permissions' => array(
'read' => 'all',
'edit' => 'roles',
'edit-specific' => array( 'administrator' ),
),
),
);
}

Expand Down Expand Up @@ -824,7 +824,7 @@ public function get_permission_data( $data ) {
foreach ( $users as $user ) {
$options[ $i ]['value'] = $user->ID;
$options[ $i ]['label'] = $user->display_name;
$i++;
++$i;
}
}
break;
Expand All @@ -838,7 +838,7 @@ public function get_permission_data( $data ) {
foreach ( get_editable_roles() as $name => $info ) {
$options[ $i ]['value'] = $name;
$options[ $i ]['label'] = $name;
$i++;
++$i;
}
}
break;
Expand Down Expand Up @@ -874,7 +874,7 @@ public function add_rest_query_vars( $args, \WP_REST_Request $request ) {
* @param mixed $value The value to sanitize.
* @return mixed Sanitized value.
*/
private function sanitize_value( $value ) {
public function sanitize_value( $value ) {
if ( is_string( $value ) ) {
return sanitize_text_field( $value );
}
Expand Down
Loading
Loading