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/modal
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
..
chat-channel-archive-modal.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-delete-modal.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-edit-description.hbs FEATURE: Add word count and indicator when exceeded max (#19367) 2023-02-20 12:06:43 +01:00
chat-channel-edit-name-slug.hbs DEV: Correct hbs prettier violations 2023-02-02 13:03:11 +00:00
chat-channel-edit-name.hbs DEV: /channel -> /c chat route rename (#19782) 2023-01-27 09:58:12 -03:00
chat-channel-selector-modal.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-channel-toggle.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
chat-message-move-to-channel-modal.hbs DEV: Apply prettier to hbs files 2022-12-28 13:11:12 +00:00
create-channel.hbs DEV: Correct hbs prettier violations 2023-02-02 13:03:11 +00:00