Skip to content

Conversation

@ilicfilip
Copy link
Collaborator

@ilicfilip ilicfilip commented Apr 3, 2025

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
Copy link
Contributor

github-actions bot commented Apr 3, 2025

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

@aristath
Copy link
Member

aristath commented Apr 3, 2025

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
Collaborator Author

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
Member

aristath commented Jul 1, 2025

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.

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