Skip to content

feat: add real-time character counter and max length validation to CommentScreen#1127

Merged
SB2318 merged 1 commit into
SB2318:mainfrom
DeepeshKafalatiya:feature/comment-character-limit
Jun 6, 2026
Merged

feat: add real-time character counter and max length validation to CommentScreen#1127
SB2318 merged 1 commit into
SB2318:mainfrom
DeepeshKafalatiya:feature/comment-character-limit

Conversation

@DeepeshKafalatiya
Copy link
Copy Markdown
Contributor

PR Description

This PR addresses the user interaction flow on the comment submission screen. It updates CommentScreen.tsx to include an upper character cap limit configuration set to 500 characters max. Additionally, it implements a real-time reactive counter layout utilizing Tamagui styling structures to guide the contributor journey cleanly. It also features dynamic color states shifting validation text to red warnings when passing within a 20-character threshold of the limits, and enforces a .trim() validation on submission controls to protect database operations against whitespace-only posts.

Type of Change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update

Select your work-area

  • Frontend
  • Backend
  • Documentation
  • Others

Related Issue

This PR resolves the assigned feature tracking issue regarding character input limitations for user comments.

Add your Work Example

image

Fixes (mention the issue number which this fixes)

closes #1082

Checklist

  • I have updated my branch and synced it with the project's 'develop' branch before making this PR.
  • I have optimized the file changes.
  • I have added a snapshot of my work example.
  • I have made a PR to the project's develop branch.

Undertaking

  • My code follows the style guidelines of this project.

  • I have performed a self-review of my code.

  • I have commented my code, particularly in hard-to-understand areas.

  • I have made corresponding changes to the documentation.

  • I have checked for plagiarism and assure its authenticity.

  • I have read and followed the code of conduct for this repository. I understand that violation of this undertaking may have legal consequences.

  • I Agree

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Thank you @, for creating the PR and contributing to our UltimateHealth project 💗.
Our team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

@DeepeshKafalatiya
Copy link
Copy Markdown
Contributor Author

Hi maintainers,
@SB2318
I have implemented the character limit validation and real-time counter.

The Pull Request has been submitted here:(#1127)

Please review it when you get a chance. Thank you!

Copy link
Copy Markdown
Owner

@SB2318 SB2318 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!

@SB2318 SB2318 merged commit 5262a4d into SB2318:main Jun 6, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Congratulations, Your pull request has been successfully merged 🥳🎉 Thank you for your contribution to the project 🚀 Keep Contributing!! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

💡[Feature]: Add Visual Character Counter & Maximum Length Validation to the Comment Input Box

2 participants