trying to save an invalid snippet removes all the entered info
ianhi opened this issue · 1 comments
ianhi commented
Describe the bug
If you fill out the snippet form in some invalid way and click save then all your work will be lost.
To Reproduce
Create an invalid snippet info in the dialog and try to save it:
Expected behavior
There are few things I might expect:
- The save button is disabled until all fields are valid
- Saving pops up a dialog telling you what is wrong but does not remove the info.
Desktop (please complete the following information):
- OS: Ubuntu 20.04
- Browser Firefox
- Version 2.0.1
Additional context
I like the way jupyterlab-git handles this:
see e.g. https://github.com/jupyterlab/jupyterlab-git/blob/fd22f2d4c5f34545d6f8dcb3939117ecc73d0e47/src/components/NewBranchDialog.tsx#L208
ianhi commented