AllenNeuralDynamics / aind-metadata-entry-js

Metadata entry using javascript
https://metadata-entry.allenneuraldynamics.org
MIT License
1 stars 1 forks source link

Add Submit (optional), Validate, and Reset buttons to a *pinned* toolbar #140

Closed helen-m-lin closed 4 months ago

helen-m-lin commented 6 months ago

Is your feature request related to a problem? Please describe. As a user, it is hard to navigate different form actions if I am filling out a lengthy schema with many subschemas.

Describe the solution you'd like

  1. Add "Submit" (optional), "Validate", and "Reset" buttons to the toolbar.
    • react-jsonschema-form playground shows examples of programmatic form buttons.
    • Users should be able to validate their form at any time (don't have to scroll and Submit and the bottom)
    • Users should be able to reset their form at any time (don't have to refresh the page)
    • [Optional] Users should be able to submit their form at any time (don't have to scroll to the bottom of the page after fixing errors at the top)
  2. Pin the toolbar (and title section) to the top of the web page. When forms are long, only the form section should be scrollable.
    • Users should be able to always see the currently selected schema and version
  3. Mockup: image

Describe alternatives you've considered Submit button in the toolbar is optional because it might crowd the toolbar or be confusing since it will also be at the bottom of the form as before.

Additional context Add any other context or screenshots about the feature request here.

helen-m-lin commented 6 months ago

Consider also adding focusOnFirstError prop to rjsf. This will autoscroll the form to the first error on Submit, rather than having the user always scroll to find the errors.