@yuneta/gobj-ui 7.23.81 → 7.23.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1341,38 +1341,53 @@ The walks are **iterative**, not recursive: a self-referent hook (a place
1341
1341
  inside a place inside a place) is as deep as the store says, and the stack is
1342
1342
  not. A 20000-node chain is a test.
1343
1343
 
1344
- ### Closed nodes: the topology of a graph with many nodes
1344
+ ### The three views of a record: card, pill, figure
1345
1345
 
1346
1346
  A card is 172×96 px with its ports, and a graph of a few hundred of them is
1347
1347
  readable card by card and unreadable as a whole: at the zoom that fits it on
1348
- screen every card is a smudge. Since `7.23.75` a record has **two shapes**:
1349
-
1350
- - **open** — the card, with its name, its pills and its **ports**. The only
1351
- shape a link can be edited on, because a link is drawn from a port.
1352
- - **closed** — a rounded square of the topic's colour, no ports, no text:
1353
- the **topology** and nothing else. A native G6 `rect`, so the focus, the
1354
- selection and the anchor are its own stroke and halo instead of a rebuilt
1355
- innerHTML. The three tiers keep their order of size (32 / 28 / 22), and
1356
- the structural tier keeps its dashed border.
1357
-
1358
- Two toggles in the view's toolbar (`C_YUI_TREEDB_GRAPH`), next to the fold
1359
- pair, both **states** and both looking pressed:
1360
-
1361
- | toggle | attr (persisted) | what it does |
1362
- |---|---|---|
1363
- | closed nodes | `node_mode` (`expanded` / `compact`) | every record closed or every record open; a change lays the graph out again, because a square and a card do not take the same room |
1364
- | labels | `node_labels` | the name under each closed square, on or off — nothing moves, the label hangs outside the square and the layout measures the square |
1365
-
1366
- And **one node against the rule**: a double click on a node opens it if the
1367
- graph is closed and closes it if the graph is open; the node's context menu
1368
- (`open node` / `close node`) does the same, which is the door a finger has to
1369
- it. The node holds still on screen while the rest makes room, as a fold does.
1370
- A change of the global mode forgets these exceptions. Consumer i18n keys:
1371
- `closed nodes`, `node labels`, `open node`, `close node`.
1348
+ screen every card is a smudge. Since `7.23.82` a record has **three views**
1349
+ (`node_mode`), the same three the gobj tree view offers as `Vertical` /
1350
+ `Vertical compact`:
1351
+
1352
+ - **`expanded`** — the card, with its name, its pills and its **ports**. The
1353
+ view a hook is opened from, and the only one a size can be edited in.
1354
+ - **`compact`** — a one-line **pill** with the name inside, the tint and the
1355
+ border of the topic, and small ports (radius 6) on its edges, so a link can
1356
+ still be drawn. The same one-line chip a leaf record already is, at the
1357
+ tier's width (200 / 180 / 160 px). No pills.
1358
+ - **`shape`** — a **figure** of the topic's colour, no ports, no text: the
1359
+ topology and nothing else. A native G6 node — square (rounded `rect`),
1360
+ circle, diamond, triangle, hexagon or star — so the focus, the selection
1361
+ and the anchor are its own stroke and halo. The three tiers keep their
1362
+ order of size (32 / 28 / 22), the structural tier its dashed border. The
1363
+ figure is chosen in the **node properties** popover (`shape`, with the
1364
+ popover's own scope: this node, the topic, every node), remembered as the
1365
+ topic's default and saved per node in `__graphs__` as `node_shape`.
1366
+
1367
+ In the view's toolbar (`C_YUI_TREEDB_GRAPH`), next to the fold pair: three
1368
+ push buttons in one group — a card, a line, a figure — the pressed one being
1369
+ the view that is on (`full` / `compact` / `shape`, persisted as `node_mode`;
1370
+ a change lays the graph out again, because a figure and a card do not take
1371
+ the same room; buttons and not a select since `7.23.83`, because a view is
1372
+ picked at a glance and a closed list says nothing until it is opened) and a
1373
+ labels toggle (`node_labels`, the name under each figure,
1374
+ enabled in the `shape` view only — nothing moves, the label hangs outside the
1375
+ figure and the layout measures the figure).
1376
+
1377
+ And **one node against the rule**: a double click expands a pill or a figure
1378
+ into its card, and collapses a card into a pill; the node's context menu
1379
+ (`expand node` / `collapse node`) does the same, which is the door a finger
1380
+ has to it. The node holds still on screen while the rest makes room, as a
1381
+ fold does. A change of the view forgets these exceptions. The `+N` chip
1382
+ follows the shape of the card it continues: full beside a card, small beside
1383
+ a pill or a figure. Consumer i18n keys: `nodes`, `full`, `compact`, `shape`,
1384
+ `node labels`, `expand node`, `collapse node`, and the figures `square`,
1385
+ `circle`, `diamond`, `triangle`, `hexagon`, `star`.
1372
1386
 
1373
1387
  The ports of an open card grew with this (radius 14 on a card, 8 on a chip
1374
- since `7.23.79`; 10 / 5 in `7.23.75`, 2 px stroke): they are what a link is drawn from and what a resize takes hold
1375
- of, and at radius 6 with a hairline nobody could tell they were either.
1388
+ since `7.23.79`; 10 / 5 in `7.23.75`, 2 px stroke): they are what a link is
1389
+ drawn from and what a resize takes hold of, and at radius 6 with a hairline
1390
+ nobody could tell they were either.
1376
1391
 
1377
1392
  **A size nobody chose is not saved** (since `7.23.80`). `Save` collects the
1378
1393
  geometry of every card into `__graphs__`, and it used to write the SIZE and