Refactoring Post Publication System

We have completely revamped our post publication system!

Basically we want to simplify how we publish a post (or when we want to unpublish it). We simplify the create and edit post form, where previously we have to select between yes or no with a radio button. In this new change, we can now just mark a checkbox.

Meanwhile in /posts/ and /posts/{uuid} route, we can mark a post published or not with a single button. The button will toggle between publish or unpublish, depending on whether the post is already published or not.

Summary

The following changes are applied:

  • Make is_published selected via a checkbox instead of radio buttons
  • Make a button that uses route /posts/{uuid}/publish to publish a post
  • Make a button that uses route /posts/{uuid}/unpublish to unpublish a post
  • On forms, maybe consider using conditionals on whether showing publish or unpublish posts, but not both.