mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 02:13:26 -05:00
The category tags page and webhooks form were using `@form.Container` and `field.Custom` to wrap the select-kit TagChooser component. These wrappers are simple visual containers that don't participate in FormKit's field lifecycle — they silently ignore props like `@optional` and don't support validation, error display, or consistent field styling. This commit introduces a proper `field.TagChooser` FormKit control that wraps the select-kit TagChooser, mapping `@field.value` to `@tags` and `@field.set` to `@onChange`. It follows the same pattern as the existing `field.Icon` control. Changes: - New `fk/control/tag-chooser.gjs` with pass-through args for TagChooser-specific options (`@everyTag`, `@excludeSynonyms`, etc.) - Register the control in `fk/field.gjs` and add pass-through args to `fk/control-wrapper.gjs` - Convert `upsert-category/tags.gjs` allowed_tags from Container to `field.TagChooser` - Convert `webhooks-form.gjs` tag_names from `field.Custom` to `field.TagChooser` - Add `tag-chooser` support to the FormKit Ruby page object for system specs - Update simplified_category_creation_spec to use FormKit page objects - Add integration tests and styleguide example - Add webhook tag filter system spec Ref - t/174117
