Don't get stuck or lose form state when API client throws an error during submission
- Dominant language
- TypeScript
- Stars
- 189
- Forks
- 37
- Avg merge
- 17h 18m
- Merged PRs (30d)
- 17
Description
This issue appears to happen across all our forms, although it requires the API client to have an error (ie: network issue, server outage, auth token expiring, etc) so our users don't experience it yet.
Steps to reproduce
1. Open a form (ex: create a new record or bucket or collection)
2. Fill out the form
3. Force a client error (ex: disable network connectivity in dev tools)
4. Click submit
5. The form will try to submit and a client error will be shown as a notification
6. The form will also lose it's state and be stuck with a loading icon
Hopefully we can capture and prevent this in the `BaseForm` component. If not we should at least handle it on the bucket and record components.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the BaseForm component and reproduce the submission failure by disabling network connectivity as described. Check the bucket and record components if the behavior is not handled there; done means a client error notification does not lose form state or leave the form stuck showing a loading icon.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100