This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/plugins/chat/assets/javascripts/discourse/templates
Keegan George 9c29d688e7
FEATURE: Add word count and indicator when exceeded max (#19367)
**This PR creates a new core reusable component wraps a character counter around any input.**

The component accepts the arguments: `max` (the maximum character limit), `value` (the value of text to be monitored).

It can be used for example, like so:
```hbs
  <CharCounter @max="50" @value={{this.charCounterContent}}>
    <textarea
      placeholder={{i18n "styleguide.sections.char_counter.placeholder"}}
      {{on "input" (action (mut this.charCounterContent) value="target.value")}}
      class="styleguide--char-counter"></textarea>
  </CharCounter>
```

**This PR also:**
1. Applies this component to the chat plugins edit channel's *Edit Description** modal, thereby replacing the simple text area which provided no visual indication when text exceeded the max allowed characters.
2. Adds an example to the `/styleguide` route
2023-02-20 12:06:43 +01:00
..
connectors/below-footer DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
modal FEATURE: Add word count and indicator when exceeded max (#19367) 2023-02-20 12:06:43 +01:00
preferences DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
admin-plugins-chat.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-browse-all.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-browse-archived.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-browse-closed.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-browse-open.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-browse.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-info-about.hbs DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
chat-channel-info-members.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-info-settings.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-info.hbs DEV: refactors routes to simplify using outlet (#20179) 2023-02-07 13:59:32 +01:00
chat-channel-near-message.hbs DEV: Pass messageId as a dynamic segment instead of a query param (#20013) 2023-02-01 12:39:23 -03:00
chat-channel-thread.hbs FEATURE: Chat side panel with threads initial skeleton (#20209) 2023-02-14 11:38:41 +10:00
chat-channel.hbs FEATURE: Chat side panel with threads initial skeleton (#20209) 2023-02-14 11:38:41 +10:00
chat-draft-channel.hbs DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat-index.hbs DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat.hbs FEATURE: Chat side panel with threads initial skeleton (#20209) 2023-02-14 11:38:41 +10:00