SolidOS/solid-panes

Load form if it's defined in another document?

Opened this issue · 1 comments

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.

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> .