discourse/plugins/styleguide
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
..
app/controllers/styleguide DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
assets FEATURE: Add word count and indicator when exceeded max (#19367) 2023-02-20 12:06:43 +01:00
config FEATURE: Add word count and indicator when exceeded max (#19367) 2023-02-20 12:06:43 +01:00
lib/styleguide
public/images
spec/integration DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
plugin.rb DEV: Apply syntax_tree formatting to plugins/* 2023-01-07 11:11:37 +00:00
README.md
screenshot.png

styleguide

Adds a URL of /styleguide to discourse that renders widgets in various
configurations to aid in styling.

Screenshot