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/controllers
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
..
admin-plugins-chat.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-archive-modal.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-delete-modal.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-edit-description.js FEATURE: Add word count and indicator when exceeded max (#19367) 2023-02-20 12:06:43 +01:00
chat-channel-edit-name-slug.js FEATURE: Allow editing channel slug (#19948) 2023-01-30 13:18:34 +10:00
chat-channel-index.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-info-about.js FEATURE: Allow editing channel slug (#19948) 2023-01-30 13:18:34 +10:00
chat-channel-info-members.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-info-settings.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-info.js DEV: start glimmer-ification and optimisations of chat plugin (#19531) 2022-12-21 13:21:02 +01:00
chat-channel-selector-modal.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat-channel-toggle.js DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat-channel.js DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat-draft-channel.js DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat-index.js DEV: routable chat part 2 (#20232) 2023-02-14 11:27:07 +01:00
chat-message-move-to-channel-modal.js DEV: Move discourse-chat to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
chat.js FEATURE: Chat side panel with threads initial skeleton (#20209) 2023-02-14 11:38:41 +10:00
create-channel.js REFACTOR: Fix pluralized strings in chat plugin (#20357) 2023-02-20 10:31:02 +01:00
preferences-chat.js A11Y: more descriptive user page titles (#19819) 2023-01-19 12:45:45 -05:00