Collapse the palette's vendor groups until something narrows the list #351
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!351
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/palette-collapse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
A summary line states how much of the catalogue is on screen (
1498 devices in 243 vendor groups, or274 of 1498 deviceswhen filtering) instead of leaving people to count vendor rows.renderPaletteand asetCataloghook are exposed onwindow.__pf, because the assertion that matters here is how many.device-cardnodes exist — whichfilterDevicescannot answer.test/palette-collapse.test.jsdrives the realapp.jsin 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. 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.0b1fac09d56405ff4ca3