website icon indicating copy to clipboard operation
website copied to clipboard

🐛Bug: Feedback Form Submits Empty String

Open vishwajeet1729 opened this issue 10 months ago • 9 comments

Describe the bug

The feedback form allows submission even when the comment field is empty. This results in blank feedback entries being recorded.

Steps To Reproduce

Leave the "feedback-comment" field empty. Click the submit button. The form submits successfully instead of showing an error

Expected Behavior

The form should prevent submission when the comment field is empty and display an error message instead.

Screenshots

Image

Device Information [optional]

- OS:
- Browser:
- version:

Are you working on this issue?

Yes

Do you think this work might require an [Architectural Decision Record (ADR)]? (significant or noteworthy)

No

Solution:

code to be added in the file website/components/DocsHelp.tsx

const feedbackComment = formData.get('feedback-comment')?.toString().trim(); if (!feedbackComment) { setError('Feedback comment cannot be empty.'); return false; }

vishwajeet1729 avatar Feb 17 '25 14:02 vishwajeet1729

Welcome to the JSON Schema Community. We are so excited you are here! Thanks a lot for reporting your first issue!! 🎉🎉 Please make sure to take a look at our contributors guide if you plan on opening a pull request. For more details, check out the README.md file.

github-actions[bot] avatar Feb 17 '25 14:02 github-actions[bot]

waiting for the assigning of the issue

vishwajeet1729 avatar Feb 17 '25 14:02 vishwajeet1729

Great proposal. Let's fix it. Interested in working on it? @vishwajeet1729

benjagm avatar Jun 14 '25 09:06 benjagm

@benjagm since the issue as been open for long time,if its still not resolved kindly assign it to me i will fix it

animeshsahoo1 avatar Jun 27 '25 12:06 animeshsahoo1

Hello @benjagm , I see this issue has been open for some time. I’d be happy to contribute and work on a fix. Would it be possible to have this issue assigned to me?

Thank you!

diyaanna06 avatar Sep 01 '25 11:09 diyaanna06

/assign

ayan-ali-khan avatar Sep 17 '25 14:09 ayan-ali-khan

Hey @benjagm Can you assign this issue to me ? I am new to this repository. Really excited to contribute!

vishwansh01 avatar Nov 06 '25 06:11 vishwansh01

Hi maintainers, I’ve gone through the full history of this issue as well as the previous PR (#1705) that attempted to fix it. From what I understand:

  • The DocsHelp component was migrated to ShadCN afterwards

  • The earlier PR became outdated and was closed

  • The issue still requires proper validation based on the updated component structure

I’ve reviewed the latest DocsHelp.tsx and I’m confident I can implement:

  • Validation to prevent empty or whitespace-only feedback

  • Error-state handling aligned with ShadCN components

  • Any adjustments needed to satisfy Codecov coverage

If this issue is still available, I’d be happy to work on it. @benjagm Could you please assign it to me if it’s still open?

Thanks!

pa45h avatar Nov 22 '25 10:11 pa45h

@Utkarsh-123github assign me this issue #1746

PrateekSingh070 avatar Nov 23 '25 05:11 PrateekSingh070

Hi! I would like to work on this issue. Please assign it to me.

Mounika-max-348 avatar Nov 29 '25 15:11 Mounika-max-348

Hi 👋

I’ve gone through issue #1415 and the current PR #1970. The validation logic looks solid, but the PR appears to be blocked by Codecov failures (patch + project coverage).

If it’s okay, I’d be happy to help by:

  1. Checking the Codecov report to identify uncovered lines in the DocsHelp validation logic.
  2. Adding focused test coverage to ensure:
    • empty or whitespace-only feedback is rejected
    • valid feedback still submits successfully.
  3. Keeping the changes minimal and aligned with the current ShadCN-based DocsHelp component (post-migration).

If this issue is still available, I’d be happy to work on it. @benjagm @Utkarsh-123github

adityayadav-dev avatar Dec 17 '25 13:12 adityayadav-dev