Collapse the palette's vendor groups until something narrows the list #351

Merged
jaylouisw merged 1 commit from fix/palette-collapse into main 2026-11-08 06:57:20 +00:00
Owner

The palette rendered the entire catalogue with every vendor group expanded.

Measured in a browser on the real catalogue: 1498 device cards, 243 open groups, 11,358 DOM nodes, 802 KB of body HTML, and 115,115 px of scroll inside a 289 px viewport — roughly 400 screens between the top of the device list and the bottom. A search box made it survivable; the default state was not usable.

Groups now start collapsed unless something is narrowing the list (a query or a vendor/type facet), and a group's cards are built the first time it is opened. Searching still expands every match, because then the list is short and the ranking is the point.

before after
cards in DOM on load 1498 0
DOM nodes 11,358 2,371 (-79%)
scroll height 115,115 px 7,581 px (-93%)

A summary line states how much of the catalogue is on screen (1498 devices in 243 vendor groups, or 274 of 1498 devices when filtering) instead of leaving people to count vendor rows.

renderPalette and a setCatalog hook are exposed on window.__pf, because the assertion that matters here is how many .device-card nodes exist — which filterDevices cannot answer. test/palette-collapse.test.js drives the real app.js in a recording DOM: no cards with no query, one row per vendor, lazy build on first open, no double-build on reopen, every match built while searching, and a return to collapsed when the query clears.

84 suites, 4201 assertions.

The palette rendered the entire catalogue with every vendor group expanded. Measured in a browser on the real catalogue: **1498 device cards, 243 open groups, 11,358 DOM nodes, 802 KB of body HTML, and 115,115 px of scroll inside a 289 px viewport** — roughly 400 screens between the top of the device list and the bottom. A search box made it survivable; the default state was not usable. Groups now start collapsed unless something is narrowing the list (a query or a vendor/type facet), and a group's cards are built the first time it is opened. Searching still expands every match, because then the list is short and the ranking is the point. | | before | after | |---|---|---| | cards in DOM on load | 1498 | **0** | | DOM nodes | 11,358 | **2,371** (-79%) | | scroll height | 115,115 px | **7,581 px** (-93%) | A summary line states how much of the catalogue is on screen (`1498 devices in 243 vendor groups`, or `274 of 1498 devices` when filtering) instead of leaving people to count vendor rows. `renderPalette` and a `setCatalog` hook are exposed on `window.__pf`, because the assertion that matters here is how many `.device-card` nodes exist — which `filterDevices` cannot answer. `test/palette-collapse.test.js` drives the real `app.js` in a recording DOM: no cards with no query, one row per vendor, lazy build on first open, no double-build on reopen, every match built while searching, and a return to collapsed when the query clears. 84 suites, 4201 assertions.
Collapse the palette's vendor groups until something narrows the list
Some checks failed
CI / Test (Node 18) (pull_request) Successful in 1m14s
CI / Test (Node 20) (pull_request) Successful in 1m17s
CI / Test (Node 22) (pull_request) Successful in 1m17s
CI / Server smoke test (pull_request) Successful in 26s
CI / Docker build (pull_request) Failing after 11s
0b1fac09d5
The palette rendered the entire catalogue with every vendor group expanded. Measured in a browser on the real catalogue: 1498 device cards, 243 open groups, 11,358 DOM nodes, 802 KB of body HTML, and 115,115 px of scroll inside a 289 px viewport. That is roughly 400 screens between the top of the device list and the bottom; a search box made it survivable, but the default state was not usable.

Groups now start collapsed unless something is narrowing the list - a query or a vendor/type facet - and a group's cards are built the first time it is opened. Searching still expands every match, because then the list is short and the ranking is the point. The same measurements after the change: 0 cards on load, 2,371 DOM nodes (-79%), 7,581 px of scroll (-93%), and 'ont' still returns 274 matches in rank order with the ONTs first.

A summary line states how much of the catalogue is on screen ('1498 devices in 243 vendor groups', '274 of 1498 devices' when filtering) rather than leaving people to count vendor rows.

renderPalette and a setCatalog hook are exposed on window.__pf, because the assertion that matters here is how many .device-card nodes exist, which filterDevices cannot answer. test/palette-collapse.test.js drives the real app.js in a recording DOM: no cards with no query, one row per vendor, lazy build on first open, no double-build on reopen, every match built while searching, and a return to collapsed when the query is cleared. 84 suites, 4201 assertions.
jaylouisw force-pushed fix/palette-collapse from 0b1fac09d5
Some checks failed
CI / Test (Node 18) (pull_request) Successful in 1m14s
CI / Test (Node 20) (pull_request) Successful in 1m17s
CI / Test (Node 22) (pull_request) Successful in 1m17s
CI / Server smoke test (pull_request) Successful in 26s
CI / Docker build (pull_request) Failing after 11s
to 6405ff4ca3
Some checks failed
CI / Test (Node 18) (pull_request) Successful in 1m12s
CI / Test (Node 20) (pull_request) Successful in 1m3s
CI / Test (Node 22) (pull_request) Successful in 1m9s
CI / Server smoke test (pull_request) Successful in 27s
CI / Docker build (pull_request) Failing after 8s
2026-11-08 06:40:09 +00:00
Compare
jaylouisw deleted branch fix/palette-collapse 2026-11-08 06:57:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!351
No description provided.