fix: prevent empty feedback form submission (#1415)#2171
Open
Avanish-Gupta-CSE wants to merge 1 commit intojson-schema-org:mainfrom
Open
fix: prevent empty feedback form submission (#1415)#2171Avanish-Gupta-CSE wants to merge 1 commit intojson-schema-org:mainfrom
Avanish-Gupta-CSE wants to merge 1 commit intojson-schema-org:mainfrom
Conversation
- Add validation to prevent empty/whitespace-only feedback submission - Show error message "Feedback comment cannot be empty." - Update label from "Optional" to "Required" - Add validation for both feedback form and GitHub issue creation - Add complete Cypress test coverage for validation scenarios Fixes json-schema-org#1415
|
Hi @Avanish-Gupta-CSE! Thanks a lot for your contribution! I noticed that the following required information is missing or incomplete: kind of change description Please update the PR description to include this information. You can find placeholders in the PR template for these items. Thanks a lot! |
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2171 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 30 30
Lines 640 650 +10
Branches 198 200 +2
=========================================
+ Hits 640 650 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Author
|
Hi, checking in on this PR. Please let me know if there's anything I should update or if a review is possible. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bugfix - Prevents empty feedback form submissions by adding validation.
Issue Number:
Screenshots/videos:
N/A - This is a validation logic change. The form now shows an error message "Feedback comment cannot be empty." when users try to submit empty or whitespace-only feedback.
If relevant, did you update the documentation?
N/A - No documentation changes required.
Summary
This PR fixes the issue where users could submit empty feedback via the documentation help form. The changes include:
createFeedbackHandlerto check for empty/whitespace feedbackcreateGitHubIssueHandlerfor consistencyTest Coverage
Added 3 new Cypress component tests:
Does this PR introduce a breaking change?
No.
Checklist