Skip to content

Load dashboard specified in type index #126

@jg10-mastodon-social

Description

@jg10-mastodon-social

I'm creating this issue to be an implementable version of the parent issue #14

My vision is that pos-app-browser supports multiple different pane loading mechanisms, and we therefore start with one, knowing there will be others.

This sub-issue proposes to follow the draft spec in https://jg10.solidcommunity.net/open-with/databrowser-open-with-v0.html#pane-class-podos-compatible-panes

  1. Type indexes are extended with a predicate to link to a pane
  2. The pane specifies a dashboard either as a URL that dereferences to a conforming HTML fragment, or a string with the HTML fragment itself.
  3. pos-type-router loads registered dashboards and their type and selects one or more apps/tools or dashboards (see Allow multiple tools per resource  #78)
  4. rendering involves safely adding the HTML fragment to the dom in such a way that init and resource events are respected

Remaining decisions:

  • Where should new vocabulary terms be defined?
    • While allowing multiple classes of pane is forward compatible, it would also be possible as a stopgap measure to use a single predicate, directly on the type index, e.g. :MyTypeRegistration PodOS:paneURL <path>
    • Either way, there will be PodOS-specific predicates to define.
  • What sanitization to apply to the HTML - should even inline event handlers be stripped, or is setting innerHTML sufficient (which doesn't execute script tags)

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions