Skip to content

POC - User can create "Remind me to review content" task from post edit screen - #405

Draft
ilicfilip wants to merge 15 commits into
developfrom
filip/poc-review-post-reminder
Draft

POC - User can create "Remind me to review content" task from post edit screen#405
ilicfilip wants to merge 15 commits into
developfrom
filip/poc-review-post-reminder

Conversation

@ilicfilip

@ilicfilipilicfilip commented Apr 3, 2025

Copy link
Copy Markdown
Collaborator

This is just a POC of what can be done now when we have refactored Todos into User tasks.

This PR adds a button on the Post edit screen which generates a new User (todo) task as reminder to review post content in 30 days. The task will not show up in the widget until 30 days pass.

For the purpose of this video I have changed the available_at param to be time() (without the extra 30 days), so task is visible immediately.

Screen.Recording.2025-04-03.at.13.12.56.mov

@github-actions

github-actionsBot commented Apr 3, 2025

Copy link
Copy Markdown
Contributor

@aristath

aristath commented Apr 3, 2025

Copy link
Copy Markdown
Member

If we do that, we should make the TODOs snoozable - not for users but in the backend 👍
Then, we should probably hide the task until the time comes for it to be unsnoozed

EDIT: I see that's already done, so ignore previous comment

@ilicfilip

Copy link
Copy Markdown
CollaboratorAuthor

I have merged development branch and made necessary changes, to sync this PR with the recent CPT refactor.

@aristath , I have decided to use meta_query in order not to display tasks until they are available - since we fetch user tasks only on page load it looked like a simplest solution.

Alternatively, we can use an wp_option entry to store all the task data and then create the task when available_at time is < then the current time - but to me it seemed less efficient.

@aristath
aristath marked this pull request as draft July 1, 2025 06:03
@aristath

Copy link
Copy Markdown
Member

Reminders should not be hardcoded to 30 days. User should be able to choose if they want a month, 3 months, 6 months, or a year.
When they change the reminder, we should also be checking if there's already another reminder for that post, and if so then update the existing reminder instead of creating a new one.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Code Coverage Report

MetricValue
Total Coverage31.15% 📉
Base Coverage31.49%
Difference📉 -0.34%

⚠️ Coverage below recommended 40% threshold

📊 File-level Coverage Changes (4 files)

📉 Coverage Decreased

ClassBeforeAfterChange
Progress_Planner\Todo100.00%38.78%-61.22%
Progress_Planner\Admin\Editor3.85%3.57%-0.28%
Progress_Planner\Admin\Enqueue0.43%0.38%-0.05%
Progress_Planner\Suggested_Tasks5.22%5.18%-0.04%
ℹ️ 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 freeto 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

@ilicfilip@aristath