Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions prototypes/properties-panel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Changelog

## 0.5.2 - 2026-08-19

- The panel now updates when someone ELSE writes the properties block — a
pull watch on the block reloads the snapshot (debounced) on any change, so
issuesync's "Send to Linear" writeback fills the `Linear::` chip without
navigating away. Works for any writer: other extensions, agents, and edits
made in "view as blocks".
- `window.dgPropsPanel.refresh()` now forces a fresh remount when the panel
is already mounted, instead of returning early.

## 0.5.1 - 2026-08-19

- Fixed the load failure on the roam/js `import()` path — the same pair of
bugs copy-for-latex shipped: a default import from CommonJS
roamjs-components arrives as `{ default: fn }` under esbuild's Node-interop
`__toESM` and throws when called (the stylesheet is now injected by local
code), and `runExtension`'s production failure reporter reads
`extensionAPI.settings` — undefined when loaded from a roam/js block — so
it masked the real error as "Cannot read properties of undefined (reading
'settings')". Errors are now caught and reported before that reporter can
run, and a missing `data.async.q` capability names itself.
- Guards: `tests/interop.spec.ts` bans default imports from
roamjs-components at the source level, and `tests/bundle.spec.ts` loads
the built `dist/extension.js` in jsdom with host globals stubbed and runs
`onload` exactly as the loader block does (verified to fail against the
buggy build).

## 0.5.0 - 2026-08-19

- Ported the panel from its roam/js prototype
(`DiscourseGraphs/dg-properties-panel`, extension.js v0.4.2) into this
repository's installable developer-extension form: ES module with a
`runExtension` lifecycle, all graph reads through
`roamAlphaAPI.data.async.*` (the panel renders from a pre-loaded
snapshot), writes through `data.block.*`, parameterized Datalog
throughout.
- Behavior carried over intact, including the v0.4.x line: inline link
chips with compact URL handles, display-only title prefix stripping,
resolved markdown aliases and block refs, full dark-mode coverage, the
`registerAction`/`dgpp:ready` extension contract, and SmartBlock-parity
dynamic options. The 98-assertion offline suite ports pin-for-pin to
vitest.
56 changes: 56 additions & 0 deletions prototypes/properties-panel/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Properties Panel

Renders the `#.properties` block on discourse-node pages as a structured,
editable panel — a Notion-style lens over plain Roam blocks.

**The blocks remain the only store.** Every edit the panel makes is a plain
text block write in canonical form, so agents, search, backlinks, query
builder, multiplayer, and hand-editing all keep working. A "view as blocks"
toggle reveals the native subtree at any time.

## Status

Internal prototype for evaluation by Discourse Graphs. Ported from the
roam/js prototype (`DiscourseGraphs/dg-properties-panel`, v0.4.2) into this
repository's installable developer-extension form.

## Features

- Filled slots render as chips; unfilled template slots as ghost "+ add"
affordances; a fill meter summarizes the block.
- Vocabulary-backed selects and multi-selects driven by the
`[[roam/js/attribute-select]]` registry — including its dynamic options
(`<%QUERYBUILDER:…%>`, `<%ACTIVEUSERS:…%>`), resolved by running the
registry's options block as a SmartBlock, exactly as attribute-select
does. Without SmartBlocks the dropdowns degrade to page-title
autocomplete.
- Number slots get a slider/number editor honoring the declared range.
- Hyperlinks and block refs resolve in the display: `[label](url)` values
render as link chips showing the label, bare URLs get compact handles
(Linear issue keys, `repo#123`), and `((uid))` values show the referenced
block's text. Stored raws are untouched; "edit as text" always shows the
markdown verbatim.
- Out-of-vocabulary values are flagged (⚠) with a one-click fix suggestion —
drift is surfaced, never auto-repaired.
- Single-colon `Key: value` lines render as read-only rows with live links;
`{{…:SmartBlock:…}}` buttons keep working inside the panel.
- A title-level actions row with an extension point: other extensions call
`window.dgPropsPanel.registerAction({ key, mount })` (re-registering on
each `dgpp:ready` document event) to replace the built-in stubs — the
Linear-Roam sync extension owns the "linear" slot this way.
- Dark mode for both native Roam (`.rm-dark`) and Roam Studio
(`html.rs-dark`).

## Requirements

- The Discourse Graph plugin (node types under `discourse-graph/nodes/…`
decide which pages get the panel).
- Optional: SmartBlocks + Query Builder for live dynamic dropdowns.

## Install

Load this developer-extension URL in Roam:

```text
https://discoursegraphs.com/releases/prototypes/properties-panel/
```
Loading