Skip to content

Calendar chips colored by content category - #242

Merged
HarunRRayhan merged 1 commit into
mainfrom
feat/calendar-category-colors
Oct 26, 2026
Merged

HarunRRayhan merged 1 commit into
mainfrom
feat/calendar-category-colors

Conversation

@HarunRRayhan

Copy link
Copy Markdown
Owner

What

Five calendar categories, each with its own color: Post, Morning post, Evening carousel, Bangla video, English video.

  • New posts.category column: default | morning | evening_carousel (default default).
    • API POST /api/v1/posts and PATCH /api/v1/posts/{id} accept category (validated with Rule::in(Post::CATEGORIES)); PostResource returns it, slim index includes it.
    • MCP update_post accepts category (enum in schema, validated in the dispatcher).
    • Post Overview has a Category select (dashboard PATCH).
    • Category is metadata: it does not reset approval and is not blocked by publish locks.
  • Migration backfills existing posts from the earliest PostSyncer scheduled_at in the workspace timezone: 09-11 morning, 20-22 evening carousel, else default (App\Support\Posts\PostCategoryFromSchedule).
  • Videos derive video_en from language = en, otherwise video_bn. No new column.
  • Calendar events carry category (post_default, post_morning, post_evening_carousel, video_bn, video_en). Chips get is-cat-<category>: category owns the hue (tint + 4px left border); scheduled is dashed with a light tint, published is solid with a stronger tint and a check. Legend row above the grid.

Tests

  • Calendar action: category per event for all five kinds.
  • Posts API: default, create, validation on create and patch, approval kept after a category patch.
  • Unit test for the schedule-to-category mapping (timezone, earliest group, edges).
  • Local: full Pest suite (1301 passed), Pint, PHPStan, tsc --noEmit, ESLint, Prettier, build.

Generated with Claude Code

Posts get a category column (default, morning, evening_carousel), editable
via API, MCP update_post, and the post Overview, without resetting approval.
Existing scheduled posts are backfilled from their earliest PostSyncer time
in the workspace timezone. Videos derive Bangla or English from language.
The calendar colors chips by category, keeps scheduled dashed and published
solid with a check, and shows a legend.
@HarunRRayhan
HarunRRayhan merged commit 46b4fe8 into main Oct 26, 2026
4 checks passed
@HarunRRayhan
HarunRRayhan deleted the feat/calendar-category-colors branch October 26, 2026 05:12
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.

1 participant