Skip to content

Change series state validation management

Warren Gifford requested to merge code-insights/series-validation-fix into main

Created by: vovakulikov

Fixes: https://github.com/sourcegraph/sourcegraph/issues/21094

Now if a user creates an insight but skips clicking "done" then the live preview works fine but the user gets a validation error on trying to click "create insight."

Good call from @Joelkw

This is not expected – a user assumes that because they've provided all the information and can see a live preview, they shouldn't need to click "done" essentially twice (in the series, and at the bottom of the form).

This PR implements the first @Joelkw proposal

Best UX – can we just accept "done" for you/not require you to click done as long as the fields are valid, and let you just click 'create"

Now if a user filled/edited the series card in the right way a user doesn't have to click on 'Done' button and by that kind of submit sub-form.

Merge request reports

Loading