Skip to content
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

Implement index to visualize the current and max length in Input and TextArea Components #1990

Open
myllenaalves opened this issue Oct 7, 2024 · 6 comments
Labels
design Indicates that the issue or pull request involves design considerations dev Indicates that the issue or pull request involves engineering considerations question Inquiries or questions about the project

Comments

@myllenaalves
Copy link
Contributor

Problem

We need this index so the user can visualize the number of characters (current and the maxLimit) while typing the content.

Solution

Link to figma: https://www.figma.com/design/uVFkApBTiuckbOoMiTQY8j/%F0%9F%93%90-Form-handoff---1.0?node-id=40-30666&node-type=section&m=dev

Usage examples

Screenshot 2024-10-07 at 18 13 39

Dependencies

No response

References

https://www.figma.com/design/uVFkApBTiuckbOoMiTQY8j/%F0%9F%93%90-Form-handoff---1.0?node-id=40-30666&node-type=section&m=dev

@myllenaalves myllenaalves added the proposal Proposals for enhancements to the software label Oct 7, 2024
@felipepowlist
Copy link

@davicostalf @beatrizmilhomem In terms of our current design for character length, I am only suggesting that we use color to indicate when the limit is reached (Figma). I'd like your opinion on this. This is not a must have feature, but if it makes sense we could already incorporate this in the implementation

@beatrizmilhomem
Copy link
Contributor

@felipepowlist There's no problem with incorporating the color in your context! You can also create a separate issue with this proposal, so that we can start mapping other possible scenarios and understand if it would make sense to rethink the counter in Shoreline.

@beatrizmilhomem beatrizmilhomem moved this to Discussing in Shoreline Oct 9, 2024
@beatrizmilhomem
Copy link
Contributor

@myllenaalves It's possible to implement the counter using the Field props. @lucasaarcoverde @matheusps can you give more details here, please?

@beatrizmilhomem beatrizmilhomem added design Indicates that the issue or pull request involves design considerations question Inquiries or questions about the project dev Indicates that the issue or pull request involves engineering considerations and removed proposal Proposals for enhancements to the software labels Oct 11, 2024
@myllenaalves
Copy link
Contributor Author

Hi, @beatrizmilhomem! I didn't explore the Field component, which solves the problem I bring up here. We may have some small design adjustments, but that probably solves for a while. Thank you ✨

@myllenaalves
Copy link
Contributor Author

About the small design adjustments:

I discussed it with @felipepowlist, and in the content platform Figma proposal, we have an example where the character count can exceed the limit, and the value also displays the red error color.

Shoreline:
Screenshot 2024-10-11 at 13 47 35

Figma:
Screenshot 2024-10-11 at 13 47 53

@beatrizmilhomem
Copy link
Contributor

@myllenaalves @felipepowlist is the character limit a rule or just a recommendation for the user? The critical color "Conveys that an action failed due to a system or user error." (color best practices), so it is appropriate to use it if the limit is a rule and the user can't submit the form if the limit is exceeded. The warning color is more appropriate if it is a recommendation for the user, like in the first proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Indicates that the issue or pull request involves design considerations dev Indicates that the issue or pull request involves engineering considerations question Inquiries or questions about the project
Projects
Status: Discussing
Development

No branches or pull requests

3 participants