-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Modal form framework #5354
Comments
I would like to extend this a bit:
|
|
Sub formsThey are an array of other form definitions that are rendered indented. Maybe also collapsable if they want to. Generic Django ViewsI tried to provide the idea a bit in #5295 . If I want to have a form defined from the backend I currently have no type hints and generic views to do so, I need to implement them again and again. I imagine having a View where I can define the form inputs somewhere in the class or via a getter and this view automatically handles advertisement via OPTIONS and calls a function like formSubmit. It should also handle api choices fields. Dependent settingsThis is for choices fields. Sometimes one choice field needs the value of other fields to calculate the choices. E.g. useful for providing the machine first and then conditionally get the specific machines printing form. Array listJust an input to provide a list. You start with one input, then there is a button + where you can add some inputs and each input has a delete button to remove it. |
Use either a DRF serializer or Django model, and it will be taken care of for you. Check out metadata.py - this is where most of the magic happens. All of the current "front end" forms are constructed from that data. |
Choice fields can specify a "choicesFunc" method, which gets us some of the way there. However your advanced usage probably comes after this PR is merged in (as a starting point) |
I still think we need something generic with our own options. I don't think that DRF serializers have e.g. dependent options, sub forms, and also a lot of the stuff you Implement. |
If it touches the python API I wold probaly move it to another PR as we probably need to bump the API version |
This issue (and linked PR) are only to re-implement functionality we already have in the "classic" UI |
This issue seems stale. Please react to show this is still important. |
not stale |
This issue seems stale. Please react to show this is still important. |
Not stale, long running issue in progress |
Big +1 on this, the ability to click "submit" without having to scroll to the bottom is a killer advantage of the old UI vs. the new UI currently Also, I know the old UI also handles "enter" as a modal form submission. This behavior also should be kept / added to the new UI. This is a task I'm interested in submitting a PR for. EDIT: Related Issue: https://github.com/orgs/mantinedev/discussions/1141 |
@SchrodingersGat is this still open/relevant and are the action items on top all still valid? |
This is sufficiently advanced that we can close it out. Nice work everyone :) |
reimplement the existing "API forms" framework in react
Tasks
The text was updated successfully, but these errors were encountered: