Dynamically loading panes
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start with the README and the pane registration calls in index.html, especially parent.panes.register(p) and the preference-list workaround. Trace how folder navigation and preference files currently load panes, then define behavior for default ordering, lazy registration, custom components, and arbitrary-JavaScript security before implementing. Done means dynamic panes load from the intended sources without requiring manual navigation or recompilation.
Written by the indexing model from the issue text.
Description
Responding to the README:
And so we hope we will end up with panes dynamically laoded according to user configuration preferences.
I thought I'd describe what I currently do and what I'm still missing.
A pane needs to be defined and registered using JS, so I have a index.html file that provides a custom pane sitting in my pod. When I navigate to it within solidos, it gets rendered in an IFrame.
Within that file, I call
parent.panes.register(p)
Or so that it becomes the default pane for that session:
parent.panes.list.unshift(p)
parent.panes["myPaneName"]=p
- The latter is a workaround because
registeralways adds panes in order of decreasing preference, so a user-defined pane will never be default - I currently have to specifically navigate to index.html within solidos. Pasting the URL straight into the location bar doesn't load solidos, and navigating to the folder loads solidos but not index.html. https://github.com/SolidOS/solidos/issues/196 would change the latter, i.e. the pane registration code would run automatically when navigating to the folder
- In some use cases, I don't need the pane to be always available - it would be ok for it to be registered only when navigating to a folder. For other use cases, it would be useful if the pane was automatically loaded from my preferences file (perhaps lazily the first time the relevant class is encountered). Presumably this would be just JS rather than an index.html, though maybe it could be an entire custom component.
- I do see there are security issues with executing arbitrary JS that has access to the entire parent solidos environment. I only have html files I have written in my pod at this time.
Despite the limitations above I find it very useful to be able to change a custom pane on the fly rather than having to recompile and without adding it to the mashlib bundle.
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 1
- Avg merge
- 16m
- Merged PRs (30d)
- 7
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SolidOS/pane-registry
-
Add useExistingOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
SolidOS/pane-registry#102 · 1 comment ·
All issues in SolidOS/pane-registry
Similar issues
-
bug require-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
expressjs/expressjs.com#2549 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/agent-skills#348 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
NanmiCoder/dsh-agent-teams#289 ·
Maintainers usually reply within 1 day