Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schedule post #704

Merged
merged 20 commits into from
Feb 3, 2024
Merged

Schedule post #704

merged 20 commits into from
Feb 3, 2024

Conversation

sonngdev
Copy link
Contributor

✨ Codu Pull Request 💻

Codu Logo

Pull Request details

Close #689 and #702
- Implement post scheduling feature using the field published of the table Post (see discussion in #689).
- /articles page now only includes posts that are considered published according to the new logic.
- /create page now supports post scheduling (see screenshots).
- /my-posts page now includes an additional tab Scheduled. Additionally, published time and scheduled time are also added in respective tabs (see screenshots).
🐞 Fix some existing bugs on /create page.
- Fix incorrect id for tag input.
- Fix redirection after submitting form (use router.push because redirect doesn't work with client component).
- Fix toast when post fails to submit.
- Improve some button label text.

Any Breaking changes

New feature, some stuff was renamed. Shouldn't break anything, but some alpha components should be updated later to include this new feature (/app/alpha/new/[[...postIdArr]]/_client.tsx for example).

Associated Screenshots

image
image
image Using browser's native date time picker. A scheduled post can be re-scheduled as long as it has not hit published time yet.
image Scheduled posts are sorted by ascending schedule (published) time.
image Published time is added to the bottom of the card. Sorting order doesn't change.

Copy link

vercel bot commented Jan 30, 2024

@thanhsonng is attempting to deploy a commit to the Codú Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@NiallJoeMaher NiallJoeMaher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing I think 🤔 But I think the [username] will need to be updated too!

@sonngdev
Copy link
Contributor Author

One last thing I think 🤔 But I think the [username] will need to be updated too!

@NiallJoeMaher Can you be more specific? I don't get what you are referring to, because AFAIK this PR doesn't change anything related to username.

Also, I know this is a large PR, so no pressure to merge quickly, boss.

@NiallJoeMaher
Copy link
Contributor

One last thing I think 🤔 But I think the [username] will need to be updated too!

@NiallJoeMaher Can you be more specific? I don't get what you are referring to, because AFAIK this PR doesn't change anything related to username.

Also, I know this is a large PR, so no pressure to merge quickly, boss.

For example, if I got to https://www.codu.co/niall I see all of my articles. Every user has all of their own posts on their page.

Copy link

vercel bot commented Feb 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
codu ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 3, 2024 11:55am

@NiallJoeMaher
Copy link
Contributor

@thanhsonng let me know if the last comment makes sense. 🦾 Thanks!

@sonngdev
Copy link
Contributor Author

sonngdev commented Feb 2, 2024

@thanhsonng let me know if the last comment makes sense. 🦾 Thanks!

@NiallJoeMaher yes it does, thanks for the example it really cleared things up. I will add a couple more commits soon.

@sonngdev
Copy link
Contributor Author

sonngdev commented Feb 3, 2024

@NiallJoeMaher Updated, thanks for catching it, I totally missed that [username] page. That's why code reviews are awesome 😎 If I miss anything else just let me know.

Copy link
Contributor

@NiallJoeMaher NiallJoeMaher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice one 🦾

@NiallJoeMaher NiallJoeMaher merged commit 357657b into codu-code:develop Feb 3, 2024
3 of 4 checks passed
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.

Feature: Schedule articles
2 participants