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

Load form if it's defined in another document? #322

Open
josephguillaume opened this issue Dec 13, 2021 · 1 comment
Open

Load form if it's defined in another document? #322

josephguillaume opened this issue Dec 13, 2021 · 1 comment

Comments

@josephguillaume
Copy link
Contributor

This relates to form registration, so maybe there's a different solution.

At the moment the form needs to be loaded in the store to render correctly, e.g. with the form defined in the local document or in another document that was visited previously in the same mashlib session.

I want to instead define which form should be used in the local document or in my preferences file.
I would then need the form pane to load the document defining the form before trying to render it, e.g. loading not/yet/loaded prior to rendering the form.

<#Class> ui:annotationForm <not/yet/loaded#MyForm> .

It appears the easiest option would be to wrap the appendForm with kb.fetcher.nowOrWhenFetched here:

https://github.com/solid/solid-panes/blob/f9aeaef823bbf98714208cdce56371653618e0be/src/form/pane.js#L123-L133

However this would also introduce an async behaviour where there is none at the moment.

@josephguillaume
Copy link
Contributor Author

I'm not sure where the behaviour is defined, but it looks like resources linked with rdfs:seeAlso are loaded automatically.

This therefore works:

<#Class> ui:annotationForm <not/yet/loaded#MyForm> .
<> rdfs:seeAlso <not/yet/loaded> .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant