lara-zeus / bolt

form builder for your users, with so many use cases
https://larazeus.com/bolt
MIT License
191 stars 35 forks source link

[Bug]: Non-Obvious Failed Validation on Form Options #303

Closed blhylton closed 5 months ago

blhylton commented 5 months ago

What happened?

If you edit a form field's options and there is a validation issue, but the accordion is not expanded for that particular option, it's not apparent that it failed validation.


Validation error with closed accordion


Validation error with open accordion


These screenshots were taken in order, the only difference being that the Accordion was open in the second one.

How to reproduce the bug

The images above tell the story fairly well, but to spell it out in detail:

  1. Open field options.
  2. Enter options that do not fit validation. The easiest one I found is leaving the "Data Validation" field blank on TextInput.
  3. Collapse all Accordions or open a different Accordion than the one you know has the validation issue.
  4. Submit options modal form.

Modal won't close, so it's obvious that something errored, but it's difficult to tell what without expanding the Accordion(s).

Package Version

3.0.52

PHP Version

8.2.19

Laravel Version

11.10.0

Which operating systems does with happen with?

macOS

Notes

This was truthfully reproduced on the custom-schema branch, but it is up to date with the 3.x branch, and I don't see any reason why this feature branch would impact this aspect of the UI.

I'm unfamiliar with the Accordion internals, but it should be as "simple" as bubbling up the error to highlight the section and indicate an error inside.

Edit: Added some horizontal lines around the images. They were bleeding together, making it hard to see which was which.

atmonshi commented 5 months ago

hopefully this will fix the issue, just do a composer update and check :)