Skip to content

1253 display min char limit for reviews#1259

Merged
jackrhoa merged 4 commits into
devfrom
1253-display-min-char-limit-for-reviews
Jul 5, 2026
Merged

1253 display min char limit for reviews#1259
jackrhoa merged 4 commits into
devfrom
1253-display-min-char-limit-for-reviews

Conversation

@Adrian-E-V

@Adrian-E-V Adrian-E-V commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

GitHub Issues addressed

  • This PR closes issue 1253. "Style: Display minimum character limit for reviews"

What I did

  • Reviews show the number of required characters, counting down from 200 to 1. Once reaching 200 characters, the character count will count up as normal.
  • Changed hard coded value 200 for textarea.minLength
  • review.html is the only file modified

Screenshots

  • Before
image
  • After
image

Summary by CodeRabbit

  • Bug Fixes
    • Updated the live review text counter to use the field’s configured minimum length instead of a fixed threshold.
    • When the input is below the minimum, the counter shows current/min required characters and uses an alert (danger) styling.
    • Once the minimum is met or exceeded, it switches back to displaying the current character count in a muted style.

@Adrian-E-V Adrian-E-V self-assigned this Jul 4, 2026
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 787476ce-86ae-4776-8375-72daefd21f0a

📥 Commits

Reviewing files that changed from the base of the PR and between dce57b6 and 33ce9e5.

📒 Files selected for processing (1)
  • tcf_website/templates/site/review/review.html

📝 Walkthrough

Walkthrough

The review textarea’s live character counter now derives its minimum requirement from textarea.minLength instead of a hardcoded value, and updates the displayed count and color based on whether the input meets that threshold.

Changes

Character Counter Update

Layer / File(s) Summary
Dynamic minimum length in counter logic
tcf_website/templates/site/review/review.html
The counter reads textarea.minLength to determine the minimum, shows a required-character format when below it, and switches styling based on the current count.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: displaying the minimum character limit for review text.
Description check ✅ Passed The PR description covers the issue, implementation, and screenshots, with only Testing and Notes left sparse or missing.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 1253-display-min-char-limit-for-reviews

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Adrian-E-V Adrian-E-V linked an issue Jul 4, 2026 that may be closed by this pull request
@jackrhoa

jackrhoa commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Can we show the target also, not just the remaining count?

@Adrian-E-V

Adrian-E-V commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator Author

yup, how is this @jackrhoa ?
image

It will count up normally after reaching 200

@jackrhoa

jackrhoa commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

yup, how is this @jackrhoa ?

image

It will count up normally after reaching 200

Looks good. Going to merge

@jackrhoa jackrhoa self-requested a review July 5, 2026 11:24
@jackrhoa jackrhoa merged commit ed955fb into dev Jul 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style: Display minimum character limit for reviews

2 participants