Skip to content

Commit f4c92ba

Browse files
committed
collapsible true
1 parent 199ad6d commit f4c92ba

3 files changed

Lines changed: 11 additions & 12 deletions

File tree

apps/probe-viewer/src/grouping/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ order) at the leaves.
2020

2121
`collapsible` is a per-node property that **propagates to descendants**: a node
2222
uses its own `collapsible` when set, otherwise it inherits the resolved value of
23-
its parent, and the top-level default is `true`. So each platform sets
24-
`collapsible: true` and that flows down to its families, while each length band
25-
sets `collapsible: false` (a static, always-open divider) and that flows down to
26-
its probes. `true` is a foldable header with a caret; `false` is a static
27-
divider.
23+
its parent, and the top-level default is `true`. So only the exceptions need
24+
stating: the length bands set `collapsible: false` (a static, always-open
25+
divider) and that flows down to their probes, while everything else omits it and
26+
inherits the default. `true` is a foldable header with a caret; `false` is a
27+
static divider.
2828

2929
The walker (`groupEntries.ts`) attaches each manifest entry to the node listing
3030
its model, prunes empty branches, and collects anything not placed into a

apps/probe-viewer/src/grouping/imec_neuropixels.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"hierarchy": [
3-
{ "label": "Neuropixels 1.0", "collapsible": true,
3+
{ "label": "Neuropixels 1.0",
44
"children": [
55
{ "label": "Standard", "probes": ["NP1000", "NP1001"] },
66
{ "label": "Non-human-primate",
@@ -14,7 +14,7 @@
1414
{ "label": "Optogenetics", "probes": ["NP1300"] },
1515
{ "label": "Legacy", "probes": ["PRB_1_2_0480_2", "PRB_1_4_0480_1", "PRB_1_4_0480_1_C"] }
1616
] },
17-
{ "label": "Neuropixels 2.0", "collapsible": true,
17+
{ "label": "Neuropixels 2.0",
1818
"children": [
1919
{ "label": "Non-human-primate",
2020
"children": [
@@ -24,7 +24,7 @@
2424
{ "label": "Multi-shank", "probes": ["NP2010", "NP2013", "NP2014", "NP2020", "NP2021"] },
2525
{ "label": "Legacy", "probes": ["PRB2_1_2_0640_0", "PRB2_4_2_0640_0"] }
2626
] },
27-
{ "label": "Neuropixels NXT", "collapsible": true,
27+
{ "label": "Neuropixels NXT",
2828
"children": [
2929
{ "label": "Single-shank", "probes": ["NP3010", "NP3011"] },
3030
{ "label": "Multi-shank", "probes": ["NP3020", "NP3021", "NP3022", "NP3023", "NP3024"] },

apps/probe-viewer/src/grouping/types.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@ import type { ManifestEntry } from "../types/probe";
77
//
88
// Collapsibility is a per-node property that propagates to descendants: a node
99
// uses its own `collapsible` when set, otherwise it inherits the resolved value
10-
// of its parent. The top-level default is `true`. So a platform marked
11-
// collapsible flows that down to its families, and a length band marked
12-
// non-collapsible flows that down to its probes, without either having to be
13-
// repeated on every node.
10+
// of its parent, and the top-level default is `true`. So only the exceptions
11+
// need stating: the length bands set `collapsible: false`, which flows down to
12+
// their probes, while everything else inherits the default and stays foldable.
1413

1514
export interface HierarchyNode {
1615
label: string;

0 commit comments

Comments
 (0)