* FEATURE: Add group, category, and display restrictions for signatures
Adds five new site settings to control signature behavior:
- signatures_allowed_groups: restrict signatures to specific groups
(server-side enforced in both serializers and user update hook)
- signatures_show_in_categories: limit signature display to specific categories
- signatures_first_post_only: only show signatures on the OP
- signatures_max_length: cap advanced mode signature length
- signatures_max_image_height: constrain signature image height
Also hardens URL validation (HTTP/HTTPS only) and reduces
signature_url max_length from 32KB to 2048.
All defaults are backward-compatible (empty/false = no change).
This updates the signature preferences connector to use modern Ember patterns and the new plugin API.
Changes:
- Convert to Glimmer component with `@service` injection
- Replace classic `<Input>` with native `<input>` and `{{on}}` modifier
- Use new `api.addSaveableCustomFields("profile")` API instead of `modifyClass save()` override
- Remove dead `@showUploadModal` argument from `DEditor`
- Add CSS to hide preview panel and match bio editor width
The `modifyClass` pattern for saving `custom_fields` was broken because `saveAttrNames` is now a getter that returns a fresh array on each call, so pushing to it in `save()` had no effect. The new `addSaveableCustomFields` API uses value transformers to properly add "`custom_fields`" to the save attributes.
cf. https://github.com/discourse/discourse/pull/36757
Remove deprecated discourse.post-stream-widget-overrides and associated legacy widget customizations.
This cleanup reduces technical debt, ensures future maintainability, and aligns with the latest framework improvements.
- Introduces a new `PostSignature` component to handle user signatures, ensuring compatibility with the Glimmer post stream.
- Updates initializers to integrate the new component and maintain compatibility with existing features.
I noticed an issue first on mobile. The signature editor was quite wonky. I found that if you add the classes that are present for the About Me editor ("bio-composer" and "input-xxlarge"), the CSS handles the rest and it styles things much nicer on both mobile and desktop. Let me know if you need any extra info!
- Cook on advanced mode is server side and properly cached now
- Remove deprecated dependencies on client-side code
Attention: Users on advanced mode from previous versions should re-enter
their signatures.