Skip to content

fix: Enhance DocsHelp component with comment validation and state management #1746

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

chauhan-varun
Copy link
Contributor

What kind of change does this PR introduce?

Bug Fix: Fixed a bug that allowed blank feedback submissions by enforcing comment field validation

Issue Number:

Screenshots/videos:

Screenshot from 2025-06-14 22-18-18

If relevant, did you update the documentation?

NA

Summary

  • Added state for comment input and error handling.
  • Implemented validation to ensure comments are not empty before submission.
  • Updated feedback submission logic to use the new comment state.
  • Adjusted UI to reflect required comment status and display error messages accordingly.

Does this PR introduce a breaking change?
NA

Checklist

Please ensure the following tasks are completed before submitting this pull request.

@chauhan-varun chauhan-varun requested a review from a team as a code owner June 28, 2025 17:22
@chauhan-varun
Copy link
Contributor Author

@idanidan29 ive created a new PR now this branch have no conflicts and has include recent changes

@chauhan-varun chauhan-varun changed the title Enhance DocsHelp component with comment validation and state management fix: Enhance DocsHelp component with comment validation and state management Jun 28, 2025
Copy link
Collaborator

@idanidan29 idanidan29 left a comment

Choose a reason for hiding this comment

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

Looks great, Just a small thing please take care of the linting error flagged by GitHub Actions:

Error: 135:11 error 'formData' is assigned a value but never used @typescript-eslint/no-unused-vars

…vote value from form, removing unnecessary FormData usage.
…ariable for improved readability and maintainability.
Copy link

github-actions bot commented Jun 29, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 24a4513

Copy link

codecov bot commented Jun 29, 2025

Codecov Report

Attention: Patch coverage is 73.68421% with 5 lines in your changes missing coverage. Please review.

Project coverage is 99.11%. Comparing base (d585a99) to head (24a4513).

Files with missing lines Patch % Lines
components/DocsHelp.tsx 73.68% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##              main    #1746      +/-   ##
===========================================
- Coverage   100.00%   99.11%   -0.89%     
===========================================
  Files           29       29              
  Lines          548      563      +15     
  Branches       158      164       +6     
===========================================
+ Hits           548      558      +10     
- Misses           0        5       +5     

☔ 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.

@chauhan-varun
Copy link
Contributor Author

chauhan-varun commented Jun 29, 2025

@idanidan29 ive fixed the linting error, please review

Copy link
Collaborator

@idanidan29 idanidan29 left a comment

Choose a reason for hiding this comment

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

Nice! Just missing test coverage for comment validation and the error message. Adding those would make it solid. Check the Codecov report for details on which lines to cover, we need those to keep project coverage at 100%.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Changes requested
Development

Successfully merging this pull request may close these issues.

🐛Bug: Feedback Form Submits Empty String
2 participants