feat: Add live character count display to the editor#147
feat: Add live character count display to the editor#147vedikapatil2410 wants to merge 2 commits into
Conversation
|
Hi @suresh1319 kindly review the PR for the task |
There was a problem hiding this comment.
Pull request overview
Adds a live “Characters: N” counter to the collaborative CodeMirror editor UI so users can see the current document size while typing.
Changes:
- Introduced
charCountstate inEditorand update it from the CodeMirrorchangeevent. - Rendered a footer below the editor textarea showing the current character count.
- Updated
package-lock.json(appears to be lockfile metadata churn, not feature-related).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/components/Editor.js |
Tracks editor content length and displays a live character-count footer. |
package-lock.json |
Lockfile metadata changes ("peer": true moved/removed/added across packages). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@suresh1319 Thanks for the review. I updated the character count initialization so it is reset/populated when the editor is recreated and the document syncs, preventing the previous file's count from being displayed after switching files. |
EntelligenceAI PR SummaryFixes character count state initialization in
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR correctly fixes character count state initialization in Key Findings:
Files requiring special attention
|
Summary
Fixes #<144> (replace with the actual issue number)
Added a live character counter in the editor footer that updates dynamically as the user types.
Changes Made
src/components/Editor.js: AddedcharCountstate usinguseStateeditor.on('change')handler to track character countCharacters: <count>How to Test
##Screenshot

Type of Change