SolidOS / SolidOS/solid-panes

Load form if it's defined in another document?

Open
#322 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
106
Forks
52
Avg merge
13h 35m
Merged PRs (30d)
10

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/form/pane.js at appendForm around lines 123-133, then trace how form registration and the local store are used before rendering. Compare the proposed kb.fetcher.nowOrWhenFetched flow with the current synchronous behavior; done means a form defined in another document can be declared locally or in preferences, loaded, and rendered without breaking existing forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.