Skip to content

fix: clear error message when feedback form is closed#2348

Open
sakshammjn wants to merge 1 commit intojson-schema-org:mainfrom
sakshammjn:fix/feedback-error-message-persist
Open

fix: clear error message when feedback form is closed#2348
sakshammjn wants to merge 1 commit intojson-schema-org:mainfrom
sakshammjn:fix/feedback-error-message-persist

Conversation

@sakshammjn
Copy link

What kind of change does this PR introduce?

Bugfix

Issue Number:

Video:

screen.recording.for.issue.mov

If relevant, did you update the documentation?

Not applicable.

Summary

In the DocsHelp component, submitting the feedback form with an empty textarea shows a validation error. However, if the user closes the form by toggling the same Yes/No button, the form disappears but the error message remains floating on the page. This happens because the handleVoteClick toggle handler never resets the error state. This PR clears the error state when the form is closed and also when the user begins typing, ensuring a clean UI at all times.

Does this PR introduce a breaking change?

No. The fix is minimal and only affects error state cleanup — existing validation behavior (error on empty/whitespace submission) is fully preserved.

@sakshammjn sakshammjn requested a review from a team as a code owner March 17, 2026 20:08
@github-project-automation github-project-automation bot moved this to Ready to review in PR - Triage Group Mar 17, 2026
@github-actions
Copy link

github-actions bot commented Mar 17, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 2fc05e1

@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5ca1483) to head (2fc05e1).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2348   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           30        30           
  Lines          672       675    +3     
  Branches       211       211           
=========================================
+ Hits           672       675    +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Error message remains permanently visible after closing feedback form

1 participant