Skip to content
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

Handling multiple form definitions (ui:annotationForm) #474

Open
josephguillaume opened this issue Feb 1, 2022 · 2 comments
Open

Handling multiple form definitions (ui:annotationForm) #474

josephguillaume opened this issue Feb 1, 2022 · 2 comments

Comments

@josephguillaume
Copy link

It is possible for a single class to be assigned multiple forms with
ui:creationForm or ui:annotationForm

A permanent solution probably requires either a mechanism to give the user a choice, to hardcode an order of preference (e.g. based on the document ui:annotationForm is defined in) or allow a user to specify a priority level for the form.

For my immediate purposes I have the problem that the same ui:annotationForm statement can be specified in multiple documents, which results in the form being rendered multiple times.

The logic to return the form to be used is in:
https://github.com/solid/solid-ui/blob/766c3f7906f991c582baad50f29061c1c9836a55/src/widgets/forms.js#L992

My temporary solution is to remove duplicate forms (i.e. ignore which document the ui:annotationForm statement was defined in). The two lines of code are here:
https://github.com/josephguillaume/my-solidos-patches/blob/afad1a9cc443fc1c996eec5dcc9463f55c670a1f/solid-ui.diff#L46

@bourgeoa
Copy link
Contributor

bourgeoa commented Feb 2, 2022

Sorry I cannot really help you but do you know this talk on forms from @timbl https://solid.github.io/solid-ui/Documentation/talks/FormsTalk.html#(1)

@josephguillaume
Copy link
Author

No worries. This seems to be mostly a UX decision that needs to be taken at some point. If others run into this problem then hopefully they'll find this issue and we can continue the discussion here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants