Skip to content

Collection pane: searchable bookmark feed (+ container-pane support)#74

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-73-collection-pane
Jun 5, 2026
Merged

Collection pane: searchable bookmark feed (+ container-pane support)#74
melvincarvalho merged 1 commit into
gh-pagesfrom
issue-73-collection-pane

Conversation

@melvincarvalho
Copy link
Copy Markdown
Contributor

Closes #73. Follow-up to #69/#71/#72.

Browser (data-browser-panes.js)

Panes are now offered containers as well as single resources:

  • render may be async and may return null/'' to decline — the browser then falls through to the folder table / JSON, so ordinary folders are unaffected.
  • h gains isContainer, path, children (parsed members), and fetchResource(url) (async → a child's primary node).

Resource panes (keyed on @type) don't match containers; a container pane that doesn't recognise a folder returns null. Net: no regression for existing folders.

Collection pane (examples/panes/bookmark-collection.js)

canHandles the conventional /public/bookmark/ container and renders its bookmark:Bookmark members as a searchable feed:

  • compact cards (favicon, title, host, 2-line summary snippet, tags), newest first
  • live search over title + summary + tags + host (self-contained inline oninput — a <script> wouldn't run via innerHTML)
  • card body → the bookmark's .jsonld detail page (full single-card summary); corner ↗ → the original link
  • returns null if the folder has no bookmarks (falls back to the folder table)

No version bump

Deliberately not bumping. data-browser-panes.js lands on gh-pages but won't reach the cdn until a future publish; running pods can pick it up via a --mashlib-module override until then.

Testing

Verified against a live pod with three enriched bookmarks: collection renders all members + count, search filters correctly, declines empty/other folders, card→detail and corner→original links resolve. node --check passes.

…port

Browser (data-browser-panes.js): panes are now offered containers as well as
single resources. render() may be async and may return null to decline, in
which case the browser falls through to the folder table / JSON (no regression
for ordinary folders). h gains isContainer, path, children, and an async
fetchResource(url) helper so a pane can render a collection.

Collection pane (examples/panes/bookmark-collection.js): canHandles the
/public/bookmark/ container and renders its bookmark:Bookmark members as a
searchable feed — compact cards (favicon, title, host, summary snippet, tags),
a live search box (inline oninput, no script tag), card body -> the bookmark's
.jsonld detail page, corner arrow -> the original link. Returns null when the
folder holds no bookmarks.

No version bump: the browser change lands on gh-pages but won't reach the cdn
until a future publish; pods can use it via a --mashlib-module override.

Refs #73
@melvincarvalho melvincarvalho merged commit 90172f7 into gh-pages Jun 5, 2026
@melvincarvalho melvincarvalho deleted the issue-73-collection-pane branch June 5, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection pane: searchable bookmark feed (+ container-pane support)

1 participant