oxidecomputer / oxidecomputer/console
Use top-level `disabled` prop on `useForm` to disable forms
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 228
- Forks
- 22
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 32
Description
#1893 handles instance create, which is the worst offender because the POST takes a long time to come back. But strictly speaking, every other form has the same problem. We could manually wire up every form with disabled props on every field, like in #1893, but it would probably be better if we could find a more automatic way.
Someone asked about this here but didn't get an answer:
https://github.com/orgs/react-hook-form/discussions/11171
https://github.com/orgs/react-hook-form/discussions/11057
RHF recently (in v7.48.0) added a way to pass disabled to useForm, and then it might automatically get passed into all registered fields. Worth exploring!
https://github.com/react-hook-form/react-hook-form/pull/10496
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the console's useForm calls and the existing instance-create handling described in #1893. Check how React Hook Form v7.48.0 propagates the top-level disabled option, then identify the forms that need it and verify that submissions disable all registered fields while the request is pending.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100