Skip to content

Conversation

@ilicfilip
Copy link
Collaborator

@ilicfilip ilicfilip commented Dec 24, 2025

This PR integrates with WordPress 6.9's new Notes feature to make "Review post X" tasks more actionable. Instead of just sending users to the edit page, we now create block-level notes that guide them through reviewing specific elements.

Implements: https://github.com/ProgressPlanner/progress-planner-pro/issues/192

Changes

  • Added "Review with Notes" action button on review tasks (WP 6.9+ only)
  • When clicked, automatically injects notes for:
    • Images: Each core/image block gets a note asking to verify relevance and display
    • Linked images: Special message noting both image and link should be checked
    • Paragraphs with links: One note per paragraph containing links, with link count
  • Notes are linked to blocks via metadata.noteId attribute
  • Task completion now checks if all PRPL notes are resolved (when notes exist)
  • Falls back to original "post modified" check when no notes present
  • Duplicate prevention: won't create notes if block already has a valid note

How It Works

  1. User clicks "Review with Notes" on a review task
  2. Opens editor with ?prpl_inject_notes=1 parameter
  3. Notes are created and linked to relevant blocks
  4. User sees notes in the Notes panel, can click to highlight blocks
  5. User resolves notes as they review each element
  6. When all notes resolved → task auto-completes

Testing

  1. Create a post with images and paragraphs containing links
  2. Backdate post_modified to >12 months ago
  3. View the review task and click "Review with Notes"
  4. Verify notes appear in the Notes panel
  5. Resolve all notes and verify task completion

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

Test on Playground
Test this pull request on the Playground
or download the zip

@github-actions
Copy link
Contributor

github-actions bot commented Dec 24, 2025

✅ Code Coverage Report

Metric Value
Total Coverage 32.67% 📉
Base Coverage 31.49%
Difference 📈 1.18%

⚠️ Coverage below recommended 40% threshold

🎉 Great job maintaining/improving code coverage!

📊 File-level Coverage Changes (1 files)

📈 Coverage Improved

Class Before After Change
Progress_Planner\Suggested_Tasks\Providers\Content_Review 0.00% 39.40% +39.40%
ℹ️ About this report
  • All tests run in a single job with Xdebug coverage
  • Security tests excluded from coverage to prevent output issues
  • Coverage calculated from line coverage percentages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants