Skip to content

feat: add article title and description counters#1114

Merged
SB2318 merged 1 commit into
SB2318:mainfrom
saurabhhhcodes:feat/article-character-counters-1076
Jun 6, 2026
Merged

feat: add article title and description counters#1114
SB2318 merged 1 commit into
SB2318:mainfrom
saurabhhhcodes:feat/article-character-counters-1076

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Summary

Adds live character counters and max-length enforcement to the Article Description screen for article title and description fields.

Fixes #1076

Root Cause

The article creation form accepted title and description text without visible limits or live feedback, so users could only discover length problems late in the flow or after submitting content.

Changes Made

  • Added explicit article title and description length constants.
  • Enforced title input at 150 characters and description input at 500 characters with maxLength and paste-safe slicing.
  • Added live counters under both fields.
  • Highlighted counters when users reach 90% of the configured limit.
  • Preserved the existing article navigation payload and submission flow.

Testing

  • git diff --check
  • npx eslint src/screens/article/ArticleDescriptionScreen.tsx
  • npm run type-check (fails on existing unrelated errors in ActivityOverview.tsx, GlossaryBottomSheet.tsx, and PodcastSearch.tsx)
  • npm run lint (fails on existing unrelated repo-wide lint errors/tests; touched ArticleDescriptionScreen.tsx passes scoped ESLint)

Impact

Users now get immediate feedback while writing article metadata, and title/description content is prevented from exceeding the configured limits before the editor step.

Labels Requested

gssoc:approved, level:intermediate, type:feature, quality:clean

@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

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! 😀

@saurabhhhcodes

Copy link
Copy Markdown
Contributor Author

Maintainers, the PR Governance check is currently failing only because I do not have permission to apply labels. Could you please add the existing issue labels: enhancement, gssoc, level:intermediate, type:feature, plus gssoc:approved and quality:clean if appropriate?

@saurabhhhcodes

Copy link
Copy Markdown
Contributor Author

CI triage update:

  • PR Governance is failing because this PR currently has no labels. I tried adding the requested labels (gssoc, level:intermediate, type:feature) but do not have label permission on this repo.
  • Frontend CI and Knip are failing before project code runs because the workflows configure dependency caching against lockfiles that are not present in the repository checkout:
    • frontend-ci.yml: cache-dependency-path: frontend/yarn.lock
    • knip-check.yml: cache-dependency-path: frontend/pnpm-lock.yaml

The touched screen still passes scoped ESLint locally. Maintainer action needed: please add at least one meaningful label, and either add/restore the frontend lockfile expected by CI or adjust those workflow cache paths/package-manager commands at repo level.

@SB2318 SB2318 merged commit 7696dae into SB2318:main Jun 6, 2026
21 of 24 checks passed
@github-actions

github-actions Bot commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

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.

Feat: Add Character Counter and Maximum Length Validation for Article Title & Description

2 participants