Add first version of code insights creation UI
Created by: vovakulikov
This PR is the first out of three PR for creation UI.
- This Pull Request.
- Introduction page for creation UI. https://github.com/sourcegraph/sourcegraph/pull/20482
- Creation UI for lang stats insights
This PR is about to add the first implementation of code insight creation UI.
Compare to the existing approach users can go to the creation page and create code insight by filling form inputs and therefore modify the user or organization settings (the existing approach assumes that the user has to edit that settings configuration manually). You can see the creation form for search-code-insight on a screenshot below.
How to test
- Open dev tools and set enableCodeInsightCreationUI field in local storage to
true
. - Go to
/insights
and click configure insight. - You must see
/insights/create
page with insight creation form.
Tech and UX details
- For form validation and form management these changes use react-final-form-hooks
- In case if a user tried to submit the form with invalid inputs we focus first on invalid input and by that force to fill all invalid parts of the creation form.
- All styles for creation form were written in CSS modules approach.
Existing UX problems which will be solved in next iterations
- Poor repositories input
- Support case when a user was included in two or more organizations (add select or some part of UI)