-
Notifications
You must be signed in to change notification settings - Fork 153
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
updated hero heading and subheading character limit to 250 #12575
Conversation
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.
Hey @danielfmiranda , the code looks great! I only have one question to confirm that what I am thinking is correct.
Does a soft character limit mean that we'll display a red character count at the bottom right of the CharFields
, but still allow the user to exceed this limit if necessary?
In this case, will the hero_subheading
field have a soft character limit of 80
characters but an actual character limit (declared in the model) of 250
characters?
Hi @AdalbertoMoz, thanks for checking! You are correct. The maximum character count for the model field is 250 characters, and the CMS will prevent users from entering more than that. However, with the soft character limit of 80. The number at the bottom right of the hero_subheading field will count down from 80 as the user types. Once they exceed the soft limit of 80, the count will turn red and show a negative number, but the user will still be able to submit successfully. CharCounterWidget with Limit of 80 and an empty field: |
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.
Thanks much for the great explanation @danielfmiranda , awesome work! 👏
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.
Thank you, working great!
Description
Related PRs/issues: TP1-842
This PR introduces the following changes:
TitleWidget
toCharCountWidget
to better reflect its broader usage beyond just title fields. This widget displays a character count at the bottom right of CharFields and turns red when the user exceeds the specified limit.hero_heading
andhero_subheading
fields in theAppInstallPage
from80
to250
.hero_subheading
to use the newly renamedCharCountWidget
, maintaining a soft character limit of80
.Screenshots
Before:
After:
┆Issue is synchronized with this Jira Story