Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
288 commits
Select commit Hold shift + click to select a range
3836c69
cleanup
aristath Dec 12, 2025
d6f0901
phpcs & phpstan fixes
aristath Dec 12, 2025
183e368
Convert editor script to react
aristath Dec 12, 2025
87ab30f
Merge branch 'develop' into ari/reactify
aristath Dec 12, 2025
0b7e061
Merge remote-tracking branch 'origin/ari/reactify' into ari/reactify
aristath Dec 12, 2025
3cb9fdd
migrate plugin-installler to react + rest-api
aristath Dec 12, 2025
488cee5
WIP - moved badges to react
aristath Dec 12, 2025
3d532d2
Migrate widgets to react
aristath Dec 12, 2025
24435ba
phpcs & phpstan & lint fixes
aristath Dec 12, 2025
888ba42
Merge branch 'develop' into ari/reactify
aristath Dec 12, 2025
25e8313
reactify popovers
aristath Dec 15, 2025
0105312
Remove tests that are no longer relevant
aristath Dec 15, 2025
c747b96
popovers fix
aristath Dec 15, 2025
ea22f92
Fix timezone selection
aristath Dec 15, 2025
c6e010c
Merge branch 'develop' into ari/reactify
aristath Dec 16, 2025
22e5b56
Merge branch 'develop' into ari/reactify
aristath Dec 16, 2025
f51cd9f
Remove dead popover code from task providers
aristath Dec 16, 2025
eb935c0
Fix duplicate widget titles
aristath Dec 16, 2025
7a181ea
Refactor: Extract gridResize utility and WidgetHeader component
aristath Dec 16, 2025
468c9ae
Refactor: Extract WidgetStates components for loading/error/empty states
aristath Dec 16, 2025
8a5b63d
Refactor: Extract useApiData hook for async fetch pattern
aristath Dec 16, 2025
5016e9f
Refactor: Standardize widget headers to use WidgetHeader component
aristath Dec 16, 2025
e6bed9f
Migrate CSS to React inline styles and clean up unused files
aristath Dec 16, 2025
44b6104
Remove PHP welcome fallback, use React Welcome component instead
aristath Dec 16, 2025
9cfc822
Fix: Always enqueue dashboard script for React welcome page
aristath Dec 16, 2025
20710aa
Fix: Add missing config and styles for React welcome page
aristath Dec 16, 2025
58d04f7
Fix: Add CSS for welcome page SVG icon height
aristath Dec 16, 2025
70bef88
Fix on the welcome screen
aristath Dec 16, 2025
3b8a278
Implement React task registration system and migrate Hello World task
aristath Dec 16, 2025
9b7d76f
Add task migration utilities and documentation
aristath Dec 16, 2025
38f5332
Migrate Sample Page task to React
aristath Dec 16, 2025
3f27115
Migrate Blog Description task to React
aristath Dec 16, 2025
a7843cc
Migrate additional tasks to React (Search Engine Visibility, Site Ico…
aristath Dec 16, 2025
5f87137
Fix Search_Engine_Visibility duplicate registration in Tasks_Manager
aristath Dec 16, 2025
911b9e2
Migrate Rename Uncategorized Category task to React
aristath Dec 16, 2025
4813ddf
Remove Rename_Uncategorized_Category from PHP Tasks_Manager
aristath Dec 16, 2025
2a9b90a
Migrate Disable Comment Pagination task to React
aristath Dec 16, 2025
ab2637b
Migrate Set Page About task to React
aristath Dec 16, 2025
aa778c6
Register Set Page About task and remove from PHP Tasks_Manager
aristath Dec 16, 2025
3520bfd
Migrate Set Page FAQ and Set Page Contact tasks to React
aristath Dec 16, 2025
c5d613d
Migrate Unpublished Content task to React
aristath Dec 16, 2025
34541f8
Migrate Core Update task to React
aristath Dec 16, 2025
4f286a5
Migrate Content Create task to React
aristath Dec 16, 2025
36c92ab
Migrate Set Valuable Post Types, Email Sending, and Improve PDF Handl…
aristath Dec 16, 2025
11efe2b
Remove Email Sending, Set Valuable Post Types, and Improve PDF Handli…
aristath Dec 16, 2025
7645713
Migrate Debug Display, PHP Version, Disable Comments, and Reduce Auto…
aristath Dec 16, 2025
c9029b7
Migrate Select Locale, Select Timezone, and Set Date Format tasks to …
aristath Dec 16, 2025
806a166
Migrate Fewer Tags, Content Review, Remove Terms Without Posts, and U…
aristath Dec 16, 2025
70c2a16
Fix task registry to handle class instances with getProviderId() method
aristath Dec 16, 2025
3e2d2e0
Add page-settings and updates REST API endpoints for React tasks
aristath Dec 16, 2025
6a7f7cc
bugfix - providers were getting cleaned-up
aristath Dec 16, 2025
3eca5f1
tasks now show up :tada:
aristath Dec 16, 2025
39bec7d
Refactor task providers to use static properties
aristath Dec 16, 2025
3f432df
Implement streaming self-registration for React tasks
aristath Dec 16, 2025
59f6c66
Migrate first batch of tasks to self-registration (10 tasks)
aristath Dec 16, 2025
9922430
Migrate second batch of tasks to self-registration (10 tasks)
aristath Dec 16, 2025
73baa38
Migrate final batch of tasks to self-registration (8 tasks)
aristath Dec 16, 2025
5600606
Simplify tasks index.js - tasks now self-register
aristath Dec 16, 2025
4c29d92
Fix linting error - remove unused taskContainer variable
aristath Dec 16, 2025
20e6cdf
Ensure priority is set on existing and newly created tasks
aristath Dec 16, 2025
d61eb55
Deprecate taskInjectionService - replaced by streaming architecture
aristath Dec 16, 2025
e7718d3
Remove unused and dead code
aristath Dec 16, 2025
2fa68b7
cleanup
aristath Dec 16, 2025
87005c0
Fix: Ensure prpl_provider is always set in REST response for React tasks
aristath Dec 16, 2025
76ed777
Fix event listener cleanup and extract inline styles in TaskActions
aristath Dec 16, 2025
4cd6cbd
Add ErrorBoundary component to catch widget crashes
aristath Dec 16, 2025
522a78d
Extract inline styles to constants in BadgeProgressBar and Dashboard
aristath Dec 16, 2025
88b4ad2
Extract inline styles to constants in TodoWidget
aristath Dec 16, 2025
d412689
Add DashboardContext for cross-widget state management
aristath Dec 16, 2025
89b6f6d
Merge branch 'develop' into ari/reactify
aristath Dec 16, 2025
97a2f4b
Merge remote-tracking branch 'origin/ari/reactify' into ari/reactify
aristath Dec 16, 2025
f88c050
Migrate SuggestedTasks and TodoWidget to use DashboardContext
aristath Dec 16, 2025
5d3b997
Remove window object communication patterns
aristath Dec 16, 2025
bd3f23a
Add API response caching to prevent redundant requests
aristath Dec 16, 2025
2aefef4
Split SuggestedTasks into smaller components
aristath Dec 16, 2025
df26a89
Organize tasks by domain for better maintainability
aristath Dec 16, 2025
6532d7e
use Zustand
aristath Dec 16, 2025
0bc2008
cleanup
aristath Dec 16, 2025
2b45259
Add onboarding view templates from PR #714
aristath Dec 17, 2025
77d4042
Update class-page.php to apply wizard config filter and add onboardin…
aristath Dec 17, 2025
5d89546
Add onboarding wizard hooks
aristath Dec 17, 2025
bc5bd4e
Add OnboardingWizard main component and base step
aristath Dec 17, 2025
d9d850a
Add OnboardingNavigation and QuitConfirmation components
aristath Dec 17, 2025
bcabc43
Add WhatsWhatStep and BadgesStep components
aristath Dec 17, 2025
9980c08
Add WelcomeStep component
aristath Dec 17, 2025
8cb2686
Add FirstTaskStep and EmailFrequencyStep components
aristath Dec 17, 2025
534e35d
Add SettingsStep component with 6 sub-steps
aristath Dec 17, 2025
da2f38c
Add MoreTasksStep and OnboardTask components
aristath Dec 17, 2025
5a598af
Integrate OnboardingWizard into Dashboard and fix component issues
aristath Dec 17, 2025
0bc5b26
Fix component imports and CSS enqueue
aristath Dec 17, 2025
f6c77ba
Improve task integration with template fetching
aristath Dec 17, 2025
4cfb8e8
Add task template rendering support
aristath Dec 17, 2025
15353b8
Remove unused useTaskTemplate hook
aristath Dec 17, 2025
4cdb2a7
Fix React hooks dependencies and improve task form handling
aristath Dec 17, 2025
dec56b9
Add wizard completion handling and improve finish flow
aristath Dec 17, 2025
70c9def
Fix wizard completion logic
aristath Dec 17, 2025
5e350de
Fix privacy policy checkbox label rendering
aristath Dec 17, 2025
f5b2cfc
Add pages and post types data to SettingsStep
aristath Dec 17, 2025
92cf6d6
Improve MoreTasksStep navigation and SettingsStep labels
aristath Dec 17, 2025
54acb94
Fix linting errors in OnboardTask component
aristath Dec 17, 2025
f2a766b
Fix linting errors in MoreTasksStep
aristath Dec 17, 2025
0ede2c7
Fix variable shadowing in OnboardingWizard
aristath Dec 17, 2025
1b1c200
Fix remaining linting errors in OnboardTask
aristath Dec 17, 2025
1af3375
Fix syntax error and complete linting fixes in OnboardTask
aristath Dec 17, 2025
4cd68dc
Fix conditional rendering syntax in OnboardTask
aristath Dec 17, 2025
12c5383
Apply code formatting improvements to hooks
aristath Dec 17, 2025
2d7a24b
Add email subscription API call to EmailFrequencyStep
aristath Dec 17, 2025
dcf9298
Fix: Add popover='manual' and tabindex attributes to onboarding wizard
aristath Dec 17, 2025
2605cc0
Fix: Render logo HTML in OnboardingNavigation component
aristath Dec 17, 2025
592d793
Fix: Update WhatsWhatStep to match original two-column layout with Re…
aristath Dec 17, 2025
88dcafd
Fix: Update BadgesStep with two-column layout and badge gauge data fr…
aristath Dec 17, 2025
6343c21
Fix: Add step-specific button text (Got it for EmailFrequencyStep and…
aristath Dec 17, 2025
92803b1
Fix: Update QuitConfirmation to match original two-column layout with…
aristath Dec 17, 2025
cd1fa85
Fix: Update MoreTasksStep intro to match original layout with two col…
aristath Dec 17, 2025
b1e7f82
Fix: Add two-column layout to SettingsStep page selection sub-steps
aristath Dec 17, 2025
bc16bde
Fix: Add two-column layout to FirstTaskStep with proper content struc…
aristath Dec 17, 2025
94fea2f
Fix: Add two-column layout to EmailFrequencyStep
aristath Dec 17, 2025
a979e89
Fix: Add right column with graphic to WelcomeStep
aristath Dec 17, 2025
c2725f3
Fix: Add Escape key handling for closing onboarding wizard
aristath Dec 17, 2025
2f50868
Fix: Add missing Fragment import in WelcomeStep
aristath Dec 17, 2025
f98e511
Fix: Remove unused useOnboardingProgress import from MoreTasksStep
aristath Dec 17, 2025
88b29c5
Fix: Update Escape key handler to avoid dependency issue
aristath Dec 17, 2025
91b08a2
Fix: Resolve linting errors - duplicate config, React hooks order, an…
aristath Dec 17, 2025
ebeee64
Fix: Resolve remaining linting errors - accessibility, formatting, an…
aristath Dec 17, 2025
4552f8a
Fix: Remove unused imports and fix variable shadowing in useOnboardin…
aristath Dec 17, 2025
96ef48c
Build: Update build files after formatting changes
aristath Dec 17, 2025
548618f
Fix: Resolve linting errors - JSDoc, variable shadowing, nested terna…
aristath Dec 17, 2025
45a1a09
Fix: Auto-fix Prettier formatting issues
aristath Dec 17, 2025
a8dd73c
Fix: Remove unused onNext variable in WelcomeStep
aristath Dec 17, 2025
639d928
Fix: Auto-fix Prettier formatting in WelcomeStep
aristath Dec 17, 2025
e17d2de
Fix: Remove unused onNext variable in MoreTasksStep
aristath Dec 17, 2025
04866b6
Fix: Achieve 100% parity with develop branch onboarding wizard
aristath Dec 17, 2025
7bcb1b5
Fix: Add retry mechanism for wizard auto-start timing
aristath Dec 17, 2025
c9a7bd0
Fix: Use Zustand store for wizard auto-start timing
aristath Dec 17, 2025
d743d0e
Fix: Add guard to prevent multiple auto-start attempts
aristath Dec 17, 2025
64a4a01
Debug: Add extensive console logging for wizard auto-start
aristath Dec 17, 2025
e809a2f
Fix: Always add wizard config to dashboard (React controls visibility)
aristath Dec 17, 2025
d76bf6a
Fix: Remove early return to always add wizard config
aristath Dec 17, 2025
57bd21f
Fix: Set priority for add_wizard_config to run before enqueue_assets
aristath Dec 17, 2025
ebd1249
Refactor: Use REST API endpoint for wizard config instead of filter
aristath Dec 17, 2025
7aeb024
Update: Simplify Dashboard auto-start logic for REST API approach
aristath Dec 17, 2025
357fa85
WIP: REST API approach for wizard config - close enough implementation
aristath Dec 17, 2025
b16c04e
Fix: Resolve fatal errors in debug.log
aristath Dec 17, 2025
771798c
Fix: Sync popover state with toggle event to allow dismissal
aristath Dec 17, 2025
c0992bd
Fix: Ensure toggle event listener is set up and popover closes properly
aristath Dec 17, 2025
b44a8e5
Fix: Improve popover close handling with immediate state update and f…
aristath Dec 17, 2025
622d433
Debug: Add logging to QuitConfirmation to track button clicks
aristath Dec 17, 2025
6143380
Fix: Prevent overlay from intercepting button clicks in QuitConfirmation
aristath Dec 17, 2025
0292a1a
Fix: Add explicit styles and mousedown handler to QuitConfirmation bu…
aristath Dec 17, 2025
367fbca
Fix: Render QuitConfirmation in React portal with maximum z-index
aristath Dec 17, 2025
8b506ac
Fix: Render quit confirmation inside popover (like develop branch)
aristath Dec 17, 2025
f23ed7e
Fix: Properly close popover and save progress when quitting onboarding
aristath Dec 17, 2025
118281f
Fix: Prevent auto-restart after user manually quits onboarding
aristath Dec 17, 2025
b86e8e9
Fix: Only auto-start wizard when there's NO saved progress
aristath Dec 17, 2025
7399a56
Remove debug logging added during onboarding wizard debugging
aristath Dec 17, 2025
e1892ee
Merge branch 'develop' into ari/backport-714
aristath Dec 17, 2025
d3725e4
fix linters, cs, stan
aristath Dec 17, 2025
df97906
Merge branch 'ari/backport-714' into ari/reactify
aristath Dec 17, 2025
50f1abf
Revert task folder organization to flat structure
aristath Dec 18, 2025
6383ef7
remove non-existing class aliases
aristath Dec 18, 2025
8f91557
Cleanup react
aristath Dec 18, 2025
c99cd52
Add Jest testing infrastructure and refactor utils/hooks to folder st…
aristath Dec 18, 2025
c8f83fc
Add tests for useApiData hook, dashboardStore, and Badge component
aristath Dec 18, 2025
7fcd2ab
Add unit tests for TaskItem component
aristath Dec 18, 2025
346e59e
Add unit tests for TaskCheckbox component
aristath Dec 18, 2025
5bcd167
Add unit tests for useTasksApi functions
aristath Dec 18, 2025
a10dcef
Add unit tests for useBadgeProgress hook
aristath Dec 18, 2025
a89b016
Add unit tests for useCelebration hook
aristath Dec 18, 2025
5a22a95
Add unit tests for useTaskCompletion hook
aristath Dec 18, 2025
b278641
Add unit tests for useBadgeData hook
aristath Dec 18, 2025
991d9e3
Add unit tests for useOnboardingWizard hook
aristath Dec 18, 2025
3698dbe
Add tests for usePopoverForms hook (32 tests)
aristath Dec 18, 2025
ad4a60b
Add tests for useBadgeProgressSave hook (14 tests)
aristath Dec 18, 2025
5237773
Add tests for useOnboardingProgress hook (15 tests)
aristath Dec 18, 2025
79ced16
Add tests for usePopoverHooks hook (11 tests)
aristath Dec 18, 2025
ff7acb2
Add tests for useCSSVariable hook (10 tests)
aristath Dec 18, 2025
f92a17c
Add tests for useLicenseGenerator hook (15 tests)
aristath Dec 18, 2025
4bdaef3
Add tests for useTaskProvider hook (12 tests)
aristath Dec 18, 2025
dcd1ac8
Add tests for useCustomSubmitHandlers hook (19 tests)
aristath Dec 18, 2025
514b01e
Add tests for useGridMasonry hook (12 tests)
aristath Dec 18, 2025
b824aea
Add tests for badgeService (22 tests)
aristath Dec 18, 2025
a60f772
Add tests for taskRegistry service
aristath Dec 18, 2025
f26ad40
Add tests for BadgeProgressBar component
aristath Dec 18, 2025
37e3ca4
Add tests for ErrorBoundary component
aristath Dec 18, 2025
845da3e
Add tests for BigCounter component
aristath Dec 18, 2025
4457e11
Add tests for WidgetHeader component
aristath Dec 18, 2025
02f3e59
Add tests for WidgetStates components
aristath Dec 18, 2025
3061dff
Add tests for Gauge component
aristath Dec 18, 2025
f15cdcf
Add tests for BadgeGrid component
aristath Dec 18, 2025
d78673a
Add tests for BadgeProgressInfo component
aristath Dec 18, 2025
9b289d8
Add tests for BarChart component
aristath Dec 18, 2025
ddbc184
Add Jest coverage to code-coverage workflow
aristath Dec 18, 2025
4051e8b
Add Jest tests for React components and widgets
aristath Dec 18, 2025
5d98d7a
Update PHPUnit tests for React-migrated task providers
aristath Dec 18, 2025
b27ac8e
Fix plugin-check workflow build directory conflict
aristath Dec 18, 2025
eb08ea2
Fix PR comment not appearing when coverage threshold fails
aristath Dec 18, 2025
a34b4fa
Add PHPUnit tests and fix get_streak() state mutation bug
aristath Dec 18, 2025
504f8cf
Add PHPUnit tests for REST widgets, admin pages, and onboarding
aristath Dec 18, 2025
42bc34b
Add skeleton views
aristath Dec 18, 2025
e6d1d29
Fix monthly badge catch-up limited to 2 months
aristath Dec 18, 2025
9edf806
fix tasks points
aristath Dec 18, 2025
b62cff1
Add taskUtils mock to tests for getTaskPoints helper
aristath Dec 18, 2025
75cfafe
fix user tasks
aristath Dec 18, 2025
eb2bdea
Fix TypeError in term task providers
aristath Dec 18, 2025
4c57f71
Implement load more/collapse for suggested tasks
aristath Dec 18, 2025
3e077c6
Add PHP data collectors for React task providers
aristath Dec 18, 2025
2f2a73c
Update React task providers to use data collectors
aristath Dec 18, 2025
7a730d4
Add buildAdminUrl and buildTaskDetails helpers to TaskProvider
aristath Dec 18, 2025
40f6cce
Extract task replacement logic in SuggestedTasks widget
aristath Dec 18, 2025
ffbf585
Remove unused useCSSVariable hook
aristath Dec 18, 2025
41e3233
Fix widget tests to match skeleton loading states
aristath Dec 18, 2025
d9349cb
Merge pull request #731 from ProgressPlanner/ari/reactify-claude-refa…
aristath Dec 18, 2025
b73833b
Refactor task actions from HTML strings to React components
aristath Dec 18, 2025
2d081bc
Unify cache invalidation across useApiData and badgeService
aristath Dec 18, 2025
8c76a9c
rebuild
aristath Dec 18, 2025
e824843
Merge branch 'ari/reactify-claude-refactor' into ari/reactify
aristath Dec 18, 2025
ec9ca74
Merge remote-tracking branch 'origin/ari/reactify' into ari/reactify
aristath Dec 18, 2025
bc04f40
Add centralized apiFetch caching proxy with request deduplication
aristath Dec 18, 2025
5189a39
Implement lazy task evaluation system for improved performance
aristath Dec 18, 2025
10b37b8
Implement REST API preloading for dashboard performance
aristath Dec 18, 2025
f7e6818
Implement progressive task loading with skeleton placeholders
aristath Dec 18, 2025
21c885d
Change playground links
aristath Dec 18, 2025
de10bbc
change widget priorities
aristath Dec 18, 2025
bbd98b3
Add more preload paths
aristath Dec 18, 2025
fc12e54
Improve task rendering performance with batched evaluation
aristath Dec 18, 2025
0e6525e
Fix: check if task exists BEFORE running shouldAddTask()
aristath Dec 18, 2025
bcfaf66
Perf: Use cachedApiFetch in fetchDataCollector for preloading support
aristath Dec 18, 2025
372919c
Perf: Pre-fetch all data collectors in parallel before evaluation
aristath Dec 18, 2025
feb67f3
Perf: Build task response directly instead of internal REST call
aristath Dec 18, 2025
3505dd1
Perf: Use cachedApiFetch for page-settings in SetPage* tasks
aristath Dec 18, 2025
0b321ce
perf: remove dead code - duplicate existence check in task creation
aristath Dec 18, 2025
92f9eb7
perf: implement true batch processing for task creation
aristath Dec 18, 2025
fe392af
build: rebuild assets with performance optimizations
aristath Dec 18, 2025
33b76b3
fix: award points when completing React tasks
aristath Dec 19, 2025
8419854
Fix task completion: points awarded and badge gauge updates
aristath Dec 19, 2025
f11ec2a
fix: correct isDismissable property to match PHP implementation
aristath Dec 19, 2025
7a7cdd8
fix strings & translations
aristath Dec 19, 2025
2cb886b
cleanup
aristath Dec 19, 2025
a3d82fe
Migrate Yoast SEO task providers to React
aristath Dec 19, 2025
3615a56
Migrate AIOSEO task providers to React
aristath Dec 19, 2025
f7fe805
Fix console errors for term_exists and batch conflicts
aristath Dec 19, 2025
ceaaf83
Remove Collaborator task system
aristath Dec 19, 2025
d71f973
Implement lazy-loading for popovers with named chunks
aristath Dec 19, 2025
56484f9
Remove focus-element feature
aristath Dec 19, 2025
8f3cde4
Remove PHP task provider system
aristath Dec 19, 2025
4aeb4f7
Remove dead code and legacy implementations
aristath Dec 19, 2025
be8d9c2
Remove dead code and unused assets (Round 3)
aristath Dec 19, 2025
9eea8f8
Cleanup round 4: remove orphaned imports and unused code
aristath Dec 19, 2025
19210a3
Fix test suite after removing PHP task providers
aristath Dec 19, 2025
d3fd222
cs fixes
aristath Dec 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,23 @@ module.exports = {
],
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: true,
},
},
rules: {
'no-console': 'off',
},
overrides: [
{
files: [
'**/__tests__/**/*.js',
'**/tests/**/*.js',
'assets/src/__tests__/*.js',
],
env: {
jest: true,
},
},
],
};
118 changes: 109 additions & 9 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ jobs:
composer-options: "--prefer-dist --with-dependencies"
custom-cache-suffix: $(date -u -d "-0 month -$(($(date +%d)-1)) days" "+%F")-codecov-v2

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install npm dependencies
run: npm ci

- name: Install WordPress Test Suite
shell: bash
run: tests/bin/install-wp-tests.sh wordpress_tests root root 127.0.0.1:3306 latest
Expand Down Expand Up @@ -123,6 +132,39 @@ jobs:
path: phpunit-output.log
retention-days: 7

- name: Run Jest tests with coverage
id: jest_coverage_current
run: |
set +e
npm run test:unit:coverage -- --coverage --coverageReporters=clover --coverageReporters=text > jest-coverage.log 2>&1
JEST_EXIT=$?
set -e

echo "=== Jest test output ==="
cat jest-coverage.log

if [ -f coverage/clover.xml ]; then
# Extract coverage from Jest Clover XML
STATEMENTS=$(xmllint --xpath 'string(//project/metrics/@statements)' coverage/clover.xml 2>/dev/null || echo "0")
COVERED=$(xmllint --xpath 'string(//project/metrics/@coveredstatements)' coverage/clover.xml 2>/dev/null || echo "0")

if [ "$STATEMENTS" != "0" ] && [ -n "$STATEMENTS" ] && [ -n "$COVERED" ]; then
JEST_COVERAGE=$(echo "scale=2; ($COVERED * 100) / $STATEMENTS" | bc)
else
JEST_COVERAGE="0"
fi

echo "jest_coverage=$JEST_COVERAGE" >> $GITHUB_OUTPUT
echo "Jest coverage: $JEST_COVERAGE%"

# Save for base branch comparison
cp coverage/clover.xml jest-coverage.xml
else
echo "jest_coverage=0" >> $GITHUB_OUTPUT
echo "No Jest coverage generated"
fi
continue-on-error: true

- name: Generate coverage report summary
id: coverage
run: |
Expand Down Expand Up @@ -237,6 +279,33 @@ jobs:
head -20 base-coverage-details.txt || true
continue-on-error: true

- name: Generate Jest coverage for base branch
if: github.event_name == 'pull_request'
id: base_jest_coverage
run: |
# Install npm dependencies on base branch
npm ci || true

# Run Jest coverage
npm run test:unit:coverage -- --coverage --coverageReporters=clover > base-jest-coverage.log 2>&1 || true

if [ -f coverage/clover.xml ]; then
STATEMENTS=$(xmllint --xpath 'string(//project/metrics/@statements)' coverage/clover.xml 2>/dev/null || echo "0")
COVERED=$(xmllint --xpath 'string(//project/metrics/@coveredstatements)' coverage/clover.xml 2>/dev/null || echo "0")

if [ "$STATEMENTS" != "0" ] && [ -n "$STATEMENTS" ] && [ -n "$COVERED" ]; then
BASE_JEST_COVERAGE=$(echo "scale=2; ($COVERED * 100) / $STATEMENTS" | bc)
else
BASE_JEST_COVERAGE="0"
fi
echo "base_jest_coverage=$BASE_JEST_COVERAGE" >> $GITHUB_OUTPUT
echo "Base Jest coverage: $BASE_JEST_COVERAGE%"
else
echo "base_jest_coverage=0" >> $GITHUB_OUTPUT
echo "No base Jest coverage generated"
fi
continue-on-error: true

- name: Generate coverage diff report
if: github.event_name == 'pull_request'
id: coverage_diff
Expand Down Expand Up @@ -364,20 +433,28 @@ jobs:
fi

- name: Comment PR with coverage
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' && always()
uses: actions/github-script@v7
env:
COVERAGE_CHANGES: ${{ steps.coverage_diff.outputs.coverage_changes }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
// PHP Coverage
const current = parseFloat('${{ steps.coverage.outputs.current_coverage }}') || 0;
const base = parseFloat('${{ steps.base_coverage.outputs.base_coverage }}') || 0;
const diff = (current - base).toFixed(2);
const diffEmoji = diff >= 0 ? '📈' : '📉';
const coverageEmoji = current >= 80 ? '🎉' : current >= 60 ? '📈' : current >= 40 ? '📊' : '📉';
const status = diff >= -0.5 ? '✅' : '⚠️';

// Jest Coverage
const jestCurrent = parseFloat('${{ steps.jest_coverage_current.outputs.jest_coverage }}') || 0;
const jestBase = parseFloat('${{ steps.base_jest_coverage.outputs.base_jest_coverage }}') || 0;
const jestDiff = (jestCurrent - jestBase).toFixed(2);
const jestDiffEmoji = jestDiff >= 0 ? '📈' : '📉';
const jestCoverageEmoji = jestCurrent >= 80 ? '🎉' : jestCurrent >= 60 ? '📈' : jestCurrent >= 40 ? '📊' : '📉';

// Parse coverage changes JSON from environment variable
let changesJson = {};
try {
Expand Down Expand Up @@ -441,24 +518,39 @@ jobs:

const comment = `## ${status} Code Coverage Report

### PHP Coverage (PHPUnit)

| Metric | Value |
|--------|-------|
| **Total Coverage** | **${current.toFixed(2)}%** ${coverageEmoji} |
| Base Coverage | ${base.toFixed(2)}% |
| Difference | ${diffEmoji} **${diff}%** |
| **Current** | **${current.toFixed(2)}%** ${coverageEmoji} |
| Base | ${base.toFixed(2)}% |
| Change | ${diffEmoji} **${diff}%** |

${current >= 40 ? '✅ Coverage meets minimum threshold (40%)' : '⚠️ Coverage below recommended 40% threshold'}
${current >= 40 ? '✅ PHP coverage meets threshold (40%)' : '⚠️ PHP coverage below 40%'}

${diff < -0.5 ? '⚠️ **Warning:** Coverage dropped by more than 0.5%. Please add tests.' : ''}
${diff >= 0 ? '🎉 Great job maintaining/improving code coverage!' : ''}
### JavaScript Coverage (Jest)

| Metric | Value |
|--------|-------|
| **Current** | **${jestCurrent.toFixed(2)}%** ${jestCoverageEmoji} |
| Base | ${jestBase.toFixed(2)}% |
| Change | ${jestDiffEmoji} **${jestDiff}%** |

${jestCurrent >= 40 ? '✅ Jest coverage meets threshold (40%)' : '⚠️ Jest coverage below 40%'}

---

${diff < -0.5 ? '⚠️ **Warning:** PHP coverage dropped by more than 0.5%. Please add tests.' : ''}
${diff >= 0 ? '🎉 Great job maintaining/improving PHP coverage!' : ''}

${detailedChanges}

<details>
<summary>ℹ️ About this report</summary>

- All tests run in a single job with Xdebug coverage
- Security tests excluded from coverage to prevent output issues
- PHP tests run with Xdebug coverage
- Jest tests run with built-in coverage
- Security tests excluded from PHP coverage
- Coverage calculated from line coverage percentages

</details>
Expand Down Expand Up @@ -507,3 +599,11 @@ jobs:
name: coverage-report
path: coverage-html/
retention-days: 30

- name: Upload Jest coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: jest-coverage-report
path: coverage/
retention-days: 30
2 changes: 1 addition & 1 deletion .github/workflows/playground-merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ jobs:
with:
message: |
**Test merged PR on Playground**
[Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }})
[Test this pull request on the Playground](https://playground.progressplanner.com/#${{ steps.blueprint.outputs.blueprint }})
or [download the zip](${{ github.server_url }}/${{ github.repository }}/archive/refs/heads/develop.zip)
2 changes: 1 addition & 1 deletion .github/workflows/playground.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,5 @@ jobs:
with:
message: |
**Test on Playground**
[Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }})
[Test this pull request on the Playground](https://playground.progressplanner.com/#${{ steps.blueprint.outputs.blueprint }})
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip)
6 changes: 3 additions & 3 deletions .github/workflows/plugin-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ jobs:
- name: Build plugin
run: |
wp dist-archive . ./${{ github.event.repository.name }}.zip
mkdir build
unzip ${{ github.event.repository.name }}.zip -d build
mkdir -p plugin-check-build
unzip ${{ github.event.repository.name }}.zip -d plugin-check-build

- name: Run plugin check
uses: wordpress/plugin-check-action@v1.0.6
with:
build-dir: './build/${{ github.event.repository.name }}'
build-dir: './plugin-check-build/${{ github.event.repository.name }}'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ auth.json

# Environment variables
.env
.claude/

coverage/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![WordPress Plugin Rating](https://img.shields.io/wordpress/plugin/stars/progress-planner.svg)](https://wordpress.org/support/plugin/progress-planner/reviews/)
[![GitHub](https://img.shields.io/github/license/ProgressPlanner/progress-planner.svg)](https://github.com/ProgressPlanner/progress-planner/blob/main/LICENSE)

[![Try Progress Planner on the WordPress playground](https://img.shields.io/badge/Try%20Progress%20Planner%20on%20the%20WordPress%20Playground-%23117AC9.svg?style=for-the-badge&logo=WordPress&logoColor=ddd)](https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fprogressplanner.com%2Fresearch%2Fblueprint-pp.php%3Frepo%3DProgressPlanner/progress-planner)
[![Try Progress Planner on the WordPress playground](https://img.shields.io/badge/Try%20Progress%20Planner%20on%20the%20WordPress%20Playground-%23117AC9.svg?style=for-the-badge&logo=WordPress&logoColor=ddd)](https://playground.progressplanner.com/?blueprint-url=https%3A%2F%2Fprogressplanner.com%2Fresearch%2Fblueprint-pp.php%3Frepo%3DProgressPlanner/progress-planner)

# Progress Planner

Expand Down
78 changes: 13 additions & 65 deletions assets/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,6 @@ body.toplevel_page_progress-planner {
margin-top: var(--prpl-padding);
}

/*------------------------------------*\
Styles for the container of the page when the privacy policy is not accepted.
\*------------------------------------*/
.prpl-pp-not-accepted {

.prpl-start-onboarding-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: var(--prpl-padding);
}

.prpl-start-onboarding-graphic {
width: 250px;
}
}

/*------------------------------------*\
Generic styles.
\*------------------------------------*/
Expand Down Expand Up @@ -209,54 +191,29 @@ button.prpl-info-icon {
/*------------------------------------*\
Header & logo.
\*------------------------------------*/
.prpl-header {
margin-bottom: 2rem;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;

.prpl-header-logo img {
height: 100px;
}
.prpl-header-logo img {
height: 100px;
}

.prpl-header-logo svg {
height: 88px;
}

.prpl-header-right {
display: flex;
gap: var(--prpl-padding);
align-items: center;

.prpl-info-icon {
width: 2rem;
height: 2rem;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.4em;

/* color: var(--prpl-color-border); */
background-color: #fff;
border: 1px solid var(--prpl-color-ui-icon);
border-radius: var(--prpl-border-radius);
.prpl-header-right .prpl-info-icon {

svg {
width: 1rem;
height: 1rem;
svg {
width: 1rem;
height: 1rem;

& path {
fill: currentcolor;
}
& path {
fill: currentcolor;
}
}

&:hover {
color: var(--prpl-color-ui-icon-hover);
border-color: var(--prpl-color-ui-icon-hover);
background-color: var(--prpl-color-ui-icon-hover-fill);
}
&:hover {
color: var(--prpl-color-ui-icon-hover);
border-color: var(--prpl-color-ui-icon-hover);
background-color: var(--prpl-color-ui-icon-hover-fill);
}
}

Expand Down Expand Up @@ -549,15 +506,6 @@ button.prpl-info-icon {
}
}

/*------------------------------------*\
Layout for columns.
\*------------------------------------*/
.prpl-columns-wrapper {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: var(--prpl-padding);
}

/*------------------------------------*\
Loader.
See https://cssloaders.github.io/ for more.
Expand Down
41 changes: 0 additions & 41 deletions assets/css/focus-element.css

This file was deleted.

Loading
Loading