@yuneta/gobj-ui 7.23.140 → 7.23.141
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 +99 -26
- package/dist/gobj-ui.cjs.js +304 -106
- package/dist/gobj-ui.es.js +304 -106
- package/package.json +2 -2
- package/src/c_g6_nodes_tree.js +75 -46
- package/src/c_yui_treedb_graph.js +146 -21
- package/src/treedb_fold_model.js +133 -1
- package/src/treedb_fold_model.test.js +80 -0
package/README.md
CHANGED
|
@@ -221,7 +221,11 @@ seen*:
|
|
|
221
221
|
Off by default: a tree whose children are pages wants the item to BE the
|
|
222
222
|
destination. On for a tree whose children are workspaces with a position
|
|
223
223
|
inside them — the agent console's strip of treedbs, each with its open topic.
|
|
224
|
-
Since 6.2.0.
|
|
224
|
+
Since 6.2.0. **Declarable in a child spec since 7.23.140** (`"remember_position":
|
|
225
|
+
true` next to its `id`): the attr existed, but the spec never passed it on,
|
|
226
|
+
so a node declared in a config could not turn it on. yunovatios turns it on
|
|
227
|
+
for its treedb nodes, so the graph tab returns to `<graph>/<topic>` with its
|
|
228
|
+
focus and the data tab to the topic that was open.
|
|
225
229
|
|
|
226
230
|
- **`nav_mode` — the three shapes as one runtime knob.** The two bullets above
|
|
227
231
|
describe what a tree *declares*; `nav_mode` is how a user *chooses* between
|
|
@@ -1310,15 +1314,28 @@ a level or two, with a count on every cut.
|
|
|
1310
1314
|
the container in the capture phase over four event types, exactly as the
|
|
1311
1315
|
JSON graph's fold handles are — G6 never reads the DOM `click`, it builds its
|
|
1312
1316
|
own from the pointer pair.
|
|
1313
|
-
- **The toolbar's fold
|
|
1314
|
-
*
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1317
|
+
- **The toolbar's fold STEPPER** (since `7.23.141`; it replaced the *expand
|
|
1318
|
+
all* / *collapse all* pair): `▸` · **`places level 2/4`** · `▾`. It walks the
|
|
1319
|
+
**main tree** one level at a time, the way the frontend view opens one level
|
|
1320
|
+
per press: level 1 is the main topic's roots (and the loose records the
|
|
1321
|
+
reader asked to see), each `▾` opens the next level through every topic that
|
|
1322
|
+
is not hidden, each `▸` folds the deepest one. The readout says what the two
|
|
1323
|
+
buttons act on — the main topic's swatch and name (data, never translated;
|
|
1324
|
+
gone on a phone, the numbers stay) and `level N/M` — the WORD as well as the
|
|
1325
|
+
numbers, because the legend chip under it says `places 2/4` too and there it
|
|
1326
|
+
means records on screen — and a button is disabled at either end. **A level is a floor, not a picture**: stepping down
|
|
1327
|
+
opens only what is folded above the new level and keeps the pages and pills
|
|
1328
|
+
already open; stepping up folds from the new level down and touches nothing
|
|
1329
|
+
above it. A topic the schema does not tie to the main one is a tree of its
|
|
1330
|
+
own, has no level, and is opened by its pills. The level is the reader's,
|
|
1331
|
+
per treedb: `fold_level` is `SDF_PERSIST` on `C_YUI_TREEDB_GRAPH`, handed to
|
|
1332
|
+
the engine on creation (`0` = never stepped = `expand_depth`), so a reload
|
|
1333
|
+
or a *refresh* opens where it was left. The old pair opened every hook of the
|
|
1334
|
+
treedb at once — the pile, on purpose, which on a treedb of thousands nobody
|
|
1335
|
+
reads — and closing threw away everything the reader had opened.
|
|
1336
|
+
**It does not move the zoom** (since `7.23.78`): a fold is not a reason to
|
|
1337
|
+
change the scale the reader chose. The camera holds the anchor still when
|
|
1338
|
+
there is one, else the first root.
|
|
1322
1339
|
- **`dagre` reads LEFT TO RIGHT** now, with explicit `nodesep`/`ranksep`: the
|
|
1323
1340
|
children of a node are a column beside it and the graph reads like a file
|
|
1324
1341
|
tree. The ports move to the sides with it (fkeys on the left edge, hooks
|
|
@@ -1424,9 +1441,11 @@ screen every card is a smudge. Since `7.23.82` a record has **three views**
|
|
|
1424
1441
|
still be drawn. The same one-line chip a leaf record already is, at the
|
|
1425
1442
|
tier's width (200 / 180 / 160 px). No pills.
|
|
1426
1443
|
- **`shape`** — a **figure** of the topic's colour, no ports, no text: the
|
|
1427
|
-
topology and nothing else. A native G6 node —
|
|
1428
|
-
|
|
1429
|
-
|
|
1444
|
+
topology and nothing else. A native G6 node — a **circle** by default
|
|
1445
|
+
(since `7.23.133`; a square until then), or a square (rounded `rect`),
|
|
1446
|
+
diamond, triangle, hexagon or star — in the outline the card and the pill
|
|
1447
|
+
wear (1, or the width chosen; it was a floor of 2) — so the focus, the
|
|
1448
|
+
selection and the anchor are its own stroke and halo. The three tiers keep their
|
|
1430
1449
|
order of size (32 / 28 / 22), the structural tier its dashed border. The
|
|
1431
1450
|
figure is chosen in the **node properties** popover (`shape`, with the
|
|
1432
1451
|
popover's own scope: this node, the topic, every node), remembered as the
|
|
@@ -1442,9 +1461,12 @@ UNDER the html: the first repaint (a selection, the focus, a theme switch, a
|
|
|
1442
1461
|
pill appearing) rebuilt that html from the topic's colour and the choice was
|
|
1443
1462
|
gone, and nothing of it ever reached the store. Choosing the topic's own
|
|
1444
1463
|
colour back, with the stroke and line width that go with it, **forgets** the
|
|
1445
|
-
entry instead of writing it: the palette is assigned by
|
|
1446
|
-
|
|
1447
|
-
|
|
1464
|
+
entry instead of writing it: the palette is assigned by the topics'
|
|
1465
|
+
ALPHABETICAL order (since `7.23.136`, in the graph and the schema diagram
|
|
1466
|
+
alike; by the backend's order before, which varies from load to load, so two
|
|
1467
|
+
topics could swap colours), and adding a topic still shifts it — a colour
|
|
1468
|
+
written down would freeze today's palette on that card, the trap the sizes
|
|
1469
|
+
fell into in `7.23.80`.
|
|
1448
1470
|
|
|
1449
1471
|
In the view's toolbar (`C_YUI_TREEDB_GRAPH`), next to the fold pair: three
|
|
1450
1472
|
push buttons in one group — a card, a line, a figure — the pressed one being
|
|
@@ -1478,12 +1500,59 @@ the day into the treedb, and a later default (the bigger ports above) reached
|
|
|
1478
1500
|
no saved treedb: the same trap as the invented cascade coordinates, for the
|
|
1479
1501
|
size. A card on its tier's default now saves its position and nothing else;
|
|
1480
1502
|
a closed node saves no size at all (a square is not the card's size), its
|
|
1481
|
-
entry keeps what it had.
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1503
|
+
entry keeps what it had.
|
|
1504
|
+
|
|
1505
|
+
**Every saved look has a way back, in the context menu** (since `7.23.134`,
|
|
1506
|
+
replacing `reset sizes` / `reset topic sizes`). In edition, the node, the port
|
|
1507
|
+
and the edge menus each offer three resets — this one, its kind (`reset topic
|
|
1508
|
+
nodes`, `reset topic ports`, `reset same type edges`, the scopes of their
|
|
1509
|
+
properties popovers) and `reset all …` — and a reset FORGETS the saved value,
|
|
1510
|
+
the element's own and the defaults of its scope, so the library's default
|
|
1511
|
+
comes back on the spot and Save writes the cleared entries. The node reset is
|
|
1512
|
+
offered in every view and forgets size, colours, line width and figure; the
|
|
1513
|
+
ports have their own (shape and radius); no reset moves a node. Consumer i18n
|
|
1514
|
+
keys: `reset node`, `reset topic nodes`, `reset all nodes`, `reset port`,
|
|
1515
|
+
`reset topic ports`, `reset all ports`, `reset edge`, `reset same type edges`,
|
|
1516
|
+
`reset all edges`.
|
|
1517
|
+
|
|
1518
|
+
**An edge is saved only where it differs from what it INHERITS** (since
|
|
1519
|
+
`7.23.134`): its hook's default in the parent topic, else the topic's, else the
|
|
1520
|
+
library's. It used to be "any line width but 2", and the library's width for an
|
|
1521
|
+
edge between two topics is 1.6, so every Save froze every such edge with its
|
|
1522
|
+
width and its theme's colour — a theme toggle no longer re-themed it after a
|
|
1523
|
+
reload. `reset all edges` clears what the old Save froze.
|
|
1524
|
+
|
|
1525
|
+
**The browser's own menu never opens over the graph** (since `7.23.133`): G6's
|
|
1526
|
+
context-menu plugin cancels the event `@antv/g` synthesises from `pointerdown`,
|
|
1527
|
+
not the DOM's `contextmenu`, so the container cancels that one (a popover's form
|
|
1528
|
+
field keeps it, for paste). An edge has a menu in edition (`edge properties`,
|
|
1529
|
+
`unlink`).
|
|
1530
|
+
|
|
1531
|
+
**The rest of the 7.23.133–7.23.140 round, in one place:**
|
|
1532
|
+
|
|
1533
|
+
- **The legend keeps its order** (`7.23.135`): its chips are alphabetical,
|
|
1534
|
+
always, and the main topic takes no seat of its own (its gold star and bold
|
|
1535
|
+
name tell it apart) — starring a topic no longer moves the strip.
|
|
1536
|
+
- **Never a blank viewport** (`7.23.137`). A camera is saved by the node
|
|
1537
|
+
nearest the middle of the viewport (or the anchor), a saved camera whose
|
|
1538
|
+
pixel is off screen is not restored, and after any placement — a restore, a
|
|
1539
|
+
refresh or a global fold holding a node still, a saved arrangement opened
|
|
1540
|
+
with no camera — a viewport with no node in it is fitted. It used to save
|
|
1541
|
+
the first root of the tree wherever it was, and a reload whose layout moved
|
|
1542
|
+
by a hair showed the tree in the minimap and nothing in the view.
|
|
1543
|
+
- **The toolbar in three parts** (`7.23.137`): left, how the graph is built
|
|
1544
|
+
(layout, operation mode); center, how it is shown (fold pair, node views);
|
|
1545
|
+
right, what it is asked (find, refresh, raw json).
|
|
1546
|
+
- **The topics view opens the graph as it was left** (`7.23.138`–`7.23.140`).
|
|
1547
|
+
`C_YUI_TREEDB_TOPICS` has a `graph` button left of `raw json`, in the
|
|
1548
|
+
landing and with a topic open; its route is `card_action_routes.graph`
|
|
1549
|
+
without its `/{topic}`, and its click navigates to
|
|
1550
|
+
`yui_shell_last_route_under()` of that route, so a focused topic
|
|
1551
|
+
(`<graph>/<topic>`) comes back with it. The cards dropped their graph icon
|
|
1552
|
+
— its topic segment was a focus, laid over whatever the reader had left —
|
|
1553
|
+
and show instead, from the desc with no request, the topic's version, its
|
|
1554
|
+
number of columns, the topics it hangs from (`↑ parents`) and the ones
|
|
1555
|
+
hanging from it (`↓ children`).
|
|
1487
1556
|
|
|
1488
1557
|
**A port has a shape, and its own properties popover** (since `7.23.81`).
|
|
1489
1558
|
G6 draws every port as a circle — `drawPortShapes` upserts a `Circle` and
|
|
@@ -1560,13 +1629,17 @@ Three edges of it: the URL wins over the strip (a route that lands on a hidden
|
|
|
1560
1629
|
topic shows it first, or it would highlight nothing and say nothing about
|
|
1561
1630
|
why); the find searches hidden topics too and counts them apart (`3 matches
|
|
1562
1631
|
(+2 in hidden topics)`), because `0` alone reads as *does not exist* when it
|
|
1563
|
-
means *is hidden*; and moving the star reopens the tree at
|
|
1564
|
-
since other roots are another tree.
|
|
1632
|
+
means *is hidden*; and moving the star reopens the tree at the reader's fold
|
|
1633
|
+
level, counted from the new roots, since other roots are another tree.
|
|
1565
1634
|
|
|
1566
1635
|
Wiring: the engine publishes `EV_LEGEND_STATE` after every reconcile — one
|
|
1567
1636
|
entry per topic (hidden ones included) with colour, total, visible, loose and
|
|
1568
|
-
flags, plus the main topic
|
|
1569
|
-
|
|
1637
|
+
flags, plus the main topic and `fold: {topic, level, levels}` for the toolbar's
|
|
1638
|
+
stepper — and the view paints the strip and the stepper from that and nothing
|
|
1639
|
+
else. A step is `EV_EXPAND_LEVEL` / `EV_COLLAPSE_LEVEL` (internal); the view
|
|
1640
|
+
persists `fold_level` and forwards `EV_SET_FOLD_LEVEL {level}` (the engine's
|
|
1641
|
+
`EV_EXPAND_ALL` / `EV_COLLAPSE_ALL` are gone). Stepper keys: `expand one
|
|
1642
|
+
level`, `collapse one level`, `fold level`, `level`. The strip's clicks are `EV_LEGEND_TOPIC {topic, action}` with
|
|
1570
1643
|
`action` one of `toggle`, `main`, `loose`, `focus`; the view persists and
|
|
1571
1644
|
forwards them as `EV_SET_HIDDEN_TOPICS`, `EV_SET_MAIN_TOPIC`,
|
|
1572
1645
|
`EV_SET_LOOSE_TOPICS`. Consumer i18n keys: `show topic`, `hide topic`,
|