36 Commits
Author SHA1 Message Date
Gabriel Grubba 1f36d20292 FIX: NaN issue and remaining not being tracked (#113)
With https://github.com/discourse/discourse-signatures/pull/105 we had an issue where the character count would show NaN when the signature was empty.

For some reason it was not being auto tracked so when you hit the keys now it should update the UI as expected.
2026-03-20 17:24:56 -03:00
8f2ab219f1 FEATURE: Add decorateCookedSignature plugin API method (#109)
* FEATURE: Add decorateCookedSignature plugin API method

Adds a new plugin API method that allows themes and plugins to
decorate signature content, similar to decorateCookedElement for
posts and decorateChatMessage for chat messages.

Usage:
  api.decorateCookedSignature((element, helper, post) => {
    // modify signature element
  });

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Co-authored-by: Gabriel Grubba <[email protected]>
2026-03-19 12:58:30 -04:00
Rafael dos Santos Silva 3af3307708 FEATURE: Add group, category, and display restrictions for signatures (#105)
* 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).
2026-03-12 15:52:35 -04:00
Régis Hanol f23bdbceeb DEV: Modernize signature preferences component (#101)
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
2025-12-23 18:03:14 +01:00
Sérgio Saquetim bf969e9979 DEV: Remove the legacy widget code (#94)
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.
2025-11-26 15:26:20 -03:00
Sérgio Saquetim 7d6b0623ec DEV: Added compatibility with the Glimmer Post Stream (#91)
- 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.
2025-07-08 17:45:13 -03:00
Jarek Radosz def8ece32c DEV: Update linting config and run gjs-codemod (#89) 2025-06-05 11:39:33 +01:00
David Taylor 77467c1372 FIX: preferences controller override following core change (#85) 2025-03-26 22:57:27 +00:00
David Taylor 46f0eec457 DEV: Colocate component templates (#78) 2025-01-09 17:42:56 +01:00
David Taylor 02354a373e DEV: Update linting (#74) 2024-11-20 18:33:54 +01:00
Joffrey JAFFEUX 6cb80325c7 UX: adds a placeholder for signature input (#63)
The placeholder makes it clear the the field expects an URL.

Also removes an un-necessary wrapping div.
2024-07-25 08:54:29 +10:00
Jarek Radosz a5606e0d4c DEV: Update linting (#55) 2024-01-16 17:48:38 +01:00
Isaac Janzen 50137517d5 DEV: Use angle bracket syntax (#43) 2023-05-26 16:18:25 -05:00
David Taylor 34a1b94e76 DEV: Update eslint-config-discourse, use prettier for hbs (#38) 2023-01-04 13:39:28 +01:00
c953a05388 DEV: Update CI workflows (#29)
* DEV: Update CI workflows
* DEV: Update CI setup
* lint

Co-authored-by: discoursebuild <[email protected]>
Co-authored-by: Jarek Radosz <[email protected]>
2022-06-11 14:38:30 +02:00
Jarek Radosz 18b047121b DEV: General cleanup (#28)
Drop es6 suffix, fix Ember global usage, fix typos, update deps, add prettierrc, remove an obsolete codepath, fix pluginId.
2022-04-06 12:19:24 +02:00
Penar Musaraj 8df68d2a7b DEV: Fix JS linting (#22) 2022-01-19 17:30:13 -05:00
Penar Musaraj a4cfe14e81 DEV: Fix linting (#21) 2022-01-19 13:09:21 -05:00
communiteqandRichard e5147551f0 Add 'signatures_visible_by_default' setting (#17)
Co-authored-by: Richard <[email protected]>
2022-01-19 11:04:31 -03:00
4bb6cbb97c DEV: Update CI workflows (#9)
* DEV: Update CI workflows
* fix templates

Co-authored-by: davidtaylorhq <[email protected]>
Co-authored-by: Jarek Radosz <[email protected]>
2021-07-04 22:11:07 +02:00
Enduvar 2276635bb2 Add support for user setting localization (#7) 2020-10-31 00:40:33 +01:00
Joffrey JAFFEUX a3433abfef DEV: apply coding standards (#6) 2020-09-04 14:37:08 +02:00
tshenry 4f3e2a763b Correct CSS classes (#5)
The CSS classes need to be moved from the checkbox block to the editor block.
2020-01-13 11:47:16 -08:00
Penar Musaraj 59bdc29622 Fix linting issue due to core Prettier update 2019-06-26 11:24:42 -04:00
David Taylor 3146fb48de DEV: Apply prettier 2018-10-22 19:49:33 +01:00
tshenry ae5e7e4922 Add two styling classes
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!
2018-06-11 17:48:26 -07:00
Rafael dos Santos Silva dc1092f336 FEATURE: 2.0
- 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.
2017-07-24 21:18:11 -03:00
Robin Ward f162247512 FIX: for Ember 2.x support 2016-11-29 17:15:45 -05:00
Rafael dos Santos Silva 26716933e4 FIX: Fix signature position after VDom migration 2016-08-10 18:33:44 -03:00
Rafael dos Santos Silva eba16235ab FIX: Fix advanced mode for Discourse 1.6 2016-08-10 18:33:00 -03:00
Rafael dos Santos Silva 319230e703 1.0.0 Version
This version adds advanced mode, and some little refactors
2016-04-08 17:30:39 -04:00
Robin Ward 852e898c39 I changed the decorateWidget API slightly, sorry! 2016-02-22 11:18:23 -05:00
Robin Ward 89f6cf5bc4 Upgrade Plugin to new API 2016-02-19 14:47:56 -05:00
Rafael dos Santos Silva 65d24d2b98 FIX: Forgot needed files in previous commit 2015-12-07 21:54:05 -02:00
Rafael dos Santos Silva 1ff4e7e1d5 New and improved working version 2015-12-06 15:56:46 -02:00
Rafael dos Santos Silva abdb17f080 First Commit 2015-09-28 20:55:31 -03:00