discourse/plugins/discourse-topic-voting/app
Régis HANOL 535d343ee2
FEATURE: Add "Ideas" category type for Topic Voting plugin (#38794)
This adds an "Ideas" category type to the category setup system,
following the same patterns established by the "Support" category type
in the discourse-solved plugin.

When admins create an Ideas category, the Topic Voting plugin is
automatically enabled and the category is preconfigured with sensible
defaults: name "Ideas", bulb emoji, and voting enabled. The Ideas tab
exposes vote limit settings (TL0-TL4), alert threshold, and visibility
settings so admins can tune them without hunting through plugin
settings.

The implementation registers a new `Ideas` category type class that
creates a `topic_voting_category_settings` record (the mechanism Topic
Voting uses to track voting-enabled categories), resets the voting
cache, and defines a configuration schema with 8 site settings. A new
`enable_ideas_category_type_setup` hidden site setting gates visibility
behind an upcoming change flag.

On the frontend, a tab initializer and `UpsertCategoryIdeas` component
mirror the Support type pattern. The legacy voting checkbox connector is
hidden when the Ideas type setup is active. The "Remove Ideas type"
button only appears when editing an existing category, not during
creation.

Ref - t/180008

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2026-04-14 11:27:18 +02:00
..
controllers/discourse_topic_voting FEATURE: Add setting to disable vote limits in topic voting (#38823) 2026-03-26 10:03:11 +01:00
jobs/regular/discourse_topic_voting
models/discourse_topic_voting FEATURE: Add trending vote sort to topic voting plugin (#38839) 2026-04-14 10:38:22 +02:00
services/discourse_topic_voting/categories/types FEATURE: Add "Ideas" category type for Topic Voting plugin (#38794) 2026-04-14 11:27:18 +02:00