Skip to content

Add tags section with categories and sectors to story ideas form#1029

Merged
maebeale merged 6 commits intocopilot/add-story-categories-populations-v2from
copilot/sub-pr-1027-again
Feb 15, 2026
Merged

Add tags section with categories and sectors to story ideas form#1029
maebeale merged 6 commits intocopilot/add-story-categories-populations-v2from
copilot/sub-pr-1027-again

Conversation

Copy link
Contributor

Copilot AI commented Feb 15, 2026

What is the goal of this PR and why is this important?

Story ideas now support tagging with categories and sectors, matching the functionality available in the stories form. This enables better organization and filtering of story ideas before they're promoted to full stories.

How did you approach the change?

Model layer:

  • Added sectorable_items association and sectors through-association to StoryIdea

Controller layer:

  • Set up @categories_grouped and @sectors in set_form_variables
  • Added assign_categories private method to assign tags before save
  • Updated strong params to permit category_ids and sector_ids arrays
  • Removed legacy categorizable_items_attributes parameter

View layer:

  • Added collapsible Tags accordion with Sectors and Categories sections
  • Sectors displayed with checkboxes for all published sectors
  • Categories grouped by type (Age Range, Story Category, etc.) with checkboxes
  • Hidden fields ensure empty arrays submit when no tags selected
  • Tags disabled when story promoted to story

Implementation mirrors the stories form pattern for consistency.

Anything else to add?

The assign logic runs before save to avoid redundant database operations. Strong parameters include category_ids and sector_ids for Rails security, though assign_categories accesses params directly to match the existing stories controller pattern.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits February 15, 2026 14:38
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Co-authored-by: maebeale <7607813+maebeale@users.noreply.github.com>
Copilot AI changed the title [WIP] Add story categories populations v2 Add tags section with categories and sectors to story ideas form Feb 15, 2026
Copilot AI requested a review from maebeale February 15, 2026 14:45
@maebeale maebeale merged commit 535b342 into copilot/add-story-categories-populations-v2 Feb 15, 2026
@maebeale maebeale deleted the copilot/sub-pr-1027-again branch February 15, 2026 14:48
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