-
Couldn't load subscription status.
- Fork 30
Create Form for Contributing a New Standard #1743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… a required field
| [id: string]: boolean | ||
| } | ||
|
|
||
| export default function Form({ fields, onSubmit }: FormProps) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some components [1], [2], we have been using react-jsonschema-form, which is really similar to what you have built here. You could just construct the schema (and maybe a uiSchema) and pass it in to the JsonSchemaForm component (it was recently refactored so you might have to synchronize with main to use the component).
Do you think using this existing pattern might help us accomplish the same/similar UI with less code? It is possible that your solution handles some trivial case that is not easy/possible in RJSF.
I'm sorry that we didn't identify this and point out this option to you earlier!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll take a look and see if I can use the JsonSchemaForm instead!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nickgros Update: I see what you mean, JsonSchemaForm was a great fit for this! I've finished the refactor and am ready for re-review.


Creates a form to allow users to submit requests for new standards. The form has no submit logic yet; this will be implemented in a future ticket. Relatedly, the new "Contribute A Standard" page containing this form has also not been hooked up to the UI yet.
Testing
For testing purposes I just temporarily hooked up the "Contribute A Standard" page by doing the following:
apps/portals/b2ai.standards/src/config/navbarConfig.ts, find the "Contribute A Standard" entry > comment out thepathproperty and replace it with the following:apps/portals/b2ai.standards/src/config/routesConfig.ts, find thechildrenproperty > add a new entry like so: