Skip to content

Make the data browser pane-aware (type-driven panes) #68

Description

@melvincarvalho

What

data-browser-folder.js now renders type-driven panes for single resources, instead of only the JSON dump. JSS already embeds the resource as <script id="dataisland" type="application/ld+json"> and gives the module a <div id="mashlib">; the browser reads the dataisland, matches the primary subject's @type, and renders a pane:

  • bookmark:Bookmark → a bookmark card (favicon, title, host, Open, saved date)
  • wf:Tracker / ical:Vtodo → a task list
  • containers → folder table (unchanged)
  • anything else → pretty-printed JSON-LD (unchanged)

A collapsible Source sits under each pane. Folder + JSON paths are byte-for-byte unchanged, so there's no regression for existing views.

This mirrors the losos pane contract (canHandle(subject, store) / render(...) keyed on @type local name).

Status — prototype, live on a local pod

Currently running on a local pod via a temporary override: lib/start.js points --mashlib-module at the pod's own served copy (http://localhost:<port>/public/data-browser-folder.js) instead of the version-pinned jsDelivr URL. The cdn line is commented directly above it for easy revert.

Verified: bookmark and tracker resources render their panes on the pod page; folders and unknown types fall back exactly as before (DOM-shim execution test + live pod).

To productionize (the work this issue tracks)

  1. Import the real panes — the browser currently inlines the bookmark/tracker render functions. Switch to importing the canonical panes/*.js modules so the browser and the pane standard share one source of truth (see the losos pane standard / bookmark-pane.js).
  2. Publish + revert — ship a new jspod version so the cdn serves the updated browser by default, then revert the lib/start.js override.
  3. Registry source — decide whether jspod ships a default @type → pane map or pulls it from losos.
  4. Type coverage — bookmark + tracker to start; events, contacts, notes, etc. as data models land.

Files

  • data-browser-folder.js — pane rendering folded in (panes inlined for now)
  • lib/start.js — temporary local-override of dataBrowserUrl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions