mirror of
https://github.com/discourse/discourse.git
synced 2025-02-18 04:53:26 +08:00
![]() **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 |
||
---|---|---|
.. | ||
_index.scss | ||
badges.scss | ||
banner.scss | ||
bookmark-list.scss | ||
bookmark-modal.scss | ||
buttons.scss | ||
char-counter.scss | ||
color-input.scss | ||
conditional-loading-section.scss | ||
convert-to-public-topic-modal.scss | ||
d-toggle-switch.scss | ||
d-tooltip.scss | ||
date-input.scss | ||
date-picker.scss | ||
date-time-input-range.scss | ||
date-time-input.scss | ||
download-calendar.scss | ||
footer-nav.scss | ||
group-member-dropdown.scss | ||
groups-form-membership-fields.scss | ||
hashtag.scss | ||
horizontal-overflow-nav.scss | ||
iframed-html.scss | ||
ignored-user-list.scss | ||
keyboard_shortcuts.scss | ||
navs.scss | ||
pick-files-button.scss | ||
relative-time-picker.scss | ||
share-and-invite-modal.scss | ||
svg.scss | ||
tap-tile.scss | ||
time-input.scss | ||
time-shortcut-picker.scss | ||
user-card.scss | ||
user-info.scss | ||
user-status-message.scss | ||
user-status-picker.scss | ||
user-stream-item.scss | ||
user-stream.scss | ||
widget-dropdown.scss |