Widget Registry
Public Made by Adomby adom
The reviewed registry of widgets renderable from plain markdown on any wiki page
Register ::adom-table, a generic filterable/sortable table widget #1
Registers one generic table widget. Closes adom/widgets#2, which has the full rationale.
{ "name": "adom-table", "mode": "frontend",
"script": "https://wiki.adom.inc/adom/component-widgets/render/widgets/adom-table.js",
"element": "adom-table", "attrs": ["src","columns","heading","filter","facet","sort","dim"] }
Short version: the same table has been hand-built three times as a bespoke
section frame (adom/stm32f103c8t6 pinout, adom/repo-ownership ownership
list, footprint variants). Each copy re-implements filtering, click-to-sort,
faceting, height reporting and theming, and they have already drifted. Two of
the six currently registered widgets are themselves tables with this logic
inlined.
::adom-table is not component-specific — it takes a JSON array and renders it:
::adom-table{src="/adom/repo-ownership/render/ownership.json" facet="owner" sort="app" heading="adom applications"}
What is in this change
widgets.json— one appended entry (7 of the 32 cap; 7 attrs of the 12 cap).README.md— the "Four load from adom/component-widgets" sentence is now "Five", and a row in the current-widgets table.
No existing entry is touched.
Verified
- Script is live and serves from the registry-gated route:
https://wiki.adom.inc/adom/component-widgets/render/widgets/adom-table.js→ 200. widgets.jsonstill parses; the entry matches the documented registration shape.- Rendered in a real browser against the runtime with 201 rows (the live
ownership.json): filter,facet="owner",sort="app"and the row counter all behave. Also rendered at 8 rows from the demo dataset shipped alongside the script aswidgets/adom-table-demo.json, so this is reproducible without access to a private page. adom-widget's own linter: clean.
One dependency worth knowing about
Building this found a runtime bug — inline <script type="application/json">
data was invisible whenever the definition was already registered when the
parser reached the element (connectedCallback fires on the opening tag, before
children exist). That is the documented data path for a README, since the readme
frame is an opaque origin where fetch is blocked. Fixed and merged as
adom-inc/adom-widget#2; readers on the deployed runtime are unaffected either
way, because the wiki injects widget scripts after parse.
Not merging this myself — adom/widgets is org-owned and yours.
Diff Skip to comments (3)
@@ -1,20 +1,24 @@⋯ 15 unchanged lines ⋯ "element": "adom-symbol-variants", "attrs": ["src", "mpn", "layout", "outline"] }, { "name": "adom-footprint-variants", "mode": "frontend", "script": "https://wiki.adom.inc/john/footprint-widgets/render/widgets/footprint-variants-widget.js",- "element": "adom-footprint-variants", "attrs": ["src", "variant", "heading"] }+ "element": "adom-footprint-variants", "attrs": ["src", "variant", "heading"] },+ { "name": "adom-table", "mode": "frontend",+ "script": "https://wiki.adom.inc/adom/component-widgets/render/widgets/adom-table.js",+ "element": "adom-table", "attrs": ["src", "columns", "heading", "filter", "facet", "sort", "dim"] } ]+@@ -1,57 +1,59 @@⋯ 44 unchanged lines ⋯ ## Current widgets -Four load from adom/component-widgets and take a JSON `src`; adom-symbol-variants loads from adom/adom-symbol and takes a component page.json `src`:+Five load from adom/component-widgets and take a JSON `src`; adom-symbol-variants loads from adom/adom-symbol and takes a component page.json `src`: | tag | shows | |---|---|⋯ 3 unchanged lines ⋯ | `::adom-heatsink-via{src="..."}` | thermal via layout | | `::adom-symbol-variants{src="..."}` | alternate schematic-symbol layouts (2-column, square, grouped, chip outline), generated in the browser | | `::adom-footprint-variants{src="..."}` | footprint-variant family (baseline, heatsink vias, 300 µm solder balls, rounded pads), parsed live from the page's `.kicad_mod` files; takes an adom-footprint `variants.json` `src` — loads from john/footprint-widgets |+| `::adom-table{src="..."}` | any JSON array as a filterable, sortable table — generic, not component-specific; `columns` `heading` `filter` `facet` `sort` `dim` |+
Comments
Log in to comment.