Skip to content

Conversation

Willem-Jaap
Copy link

@Willem-Jaap Willem-Jaap commented Jul 15, 2025

Small ux improvement for FAQ section, allow currently open item to be closed

@Copilot Copilot AI review requested due to automatic review settings July 15, 2025 07:37
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 15, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables FAQ accordion items to be toggled closed by updating the form payload and re-enabling the toggle button.

  • Change the hidden input to send -1 when closing an open item
  • Remove the disabled attribute from the toggle button
Comments suppressed due to low confidence (1)

website/src/routes/index.tsx:255

  • Add a test case to verify that setting the hidden index to -1 properly closes an open FAQ item and that the toggle behavior works as expected in future changes.
                  <input type="hidden" name="index" value={isOpen ? -1 : index} />

@dosubot dosubot bot added the fix A smaller enhancement or bug fix label Jul 15, 2025
Copy link

vercel bot commented Jul 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valibot ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2025 7:45am

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

Labels

fix A smaller enhancement or bug fix size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant