-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose secondary block and character counter from ToucanForm for Input and Textarea #222
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
'@crowdstrike/ember-toucan-form': patch | ||
--- | ||
|
||
Expose the `:secondary` block and Character Counter component from `<ToucanForm` input and textarea components. | ||
|
||
```hbs | ||
<ToucanForm @data={{data}} as |form|> | ||
<form.Input @name='input'> | ||
<:label>Label</:label> | ||
<:hint>Hint</:hint> | ||
<:secondary as |secondary|> | ||
<secondary.CharacterCount @max={{255}} /> | ||
</:secondary> | ||
</form.Input> | ||
|
||
<form.Textarea @name='textarea'> | ||
<:label>Label</:label> | ||
<:hint>Hint</:hint> | ||
<:secondary as |secondary|> | ||
<secondary.CharacterCount @max={{255}} /> | ||
</:secondary> | ||
</form.Textarea> | ||
</ToucanForm> | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,6 +70,20 @@ Provide a string to the `@hint` component argument or content to `:hint` named b | |
</Form::Fields::Input> | ||
``` | ||
|
||
## Character Counter | ||
|
||
Optional. | ||
|
||
A character counter is exposed via a `secondary` block. It can be combined with any of the other named blocks or label/hint arguments. | ||
|
||
```hbs | ||
<Form::Fields::Input class='w-full' @label='Label' @hint='With hint text'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚀 Thanks for adding this in! |
||
<:secondary as |secondary|> | ||
<secondary.CharacterCount @max={{255}} /> | ||
</:secondary> | ||
</Form::Fields::Input> | ||
``` | ||
|
||
## Error | ||
|
||
Optional. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,6 +66,20 @@ Provide a string to the `@hint` component argument or content to `:hint` named b | |
</Form::Fields::Textarea> | ||
``` | ||
|
||
## Character Counter | ||
|
||
Optional. | ||
|
||
A character counter is exposed via a `secondary` block. It can be combined with any of the other named blocks or label/hint arguments. | ||
|
||
```hbs | ||
<Form::Fields::Textarea class='w-full' @label='Label' @hint='With hint text'> | ||
<:secondary as |secondary|> | ||
<secondary.CharacterCount @max={{255}} /> | ||
</:secondary> | ||
</Form::Fields::Textarea> | ||
``` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: it would be nice to have this in the But then again, we don't have analytics (do we?) so we don't know which docs folks are looking at the most as an example... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah! Good suggestion! I was going to add this in the docs later. There's an issue I filed around maybe making components all full-width, otherwise the demo looks kinda funky. I'll work on this next week hopefully though! |
||
|
||
## Error | ||
|
||
Optional. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to bump these down as I was getting build errors (randomly) from docfy when running:
or
It's apparently not failing on CI though, which is weird. It was bumped by Renovate yesterday.
I didn't see a helpful error as to why, so I figure reverting for the time being is the path of least resistance. I'll pick this back up after other items come off of my plate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was my PR that was part of the bump to version 0.7.0: josemarluedke/docfy#161
But there were also a lot of 3 dependabot updates...https://github.com/josemarluedke/docfy/pulls?q=is%3Apr+is%3Aclosed