@yuneta/gobj-ui 7.25.13 → 7.25.15
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 +61 -15
- package/dist/gobj-ui.cjs.js +209 -74
- package/dist/gobj-ui.es.js +209 -74
- package/package.json +1 -1
- package/src/c_g6_nodes_tree.js +42 -11
- package/src/c_yui_schema_editor.js +104 -37
- package/src/c_yui_treedb_graph.js +53 -6
- package/src/c_yui_treedb_topic_with_form.js +10 -10
- package/src/c_yui_treedb_topics.js +37 -32
- package/src/form_busy.js +2 -3
- package/src/form_time_value.js +1 -1
- package/src/form_time_value.test.js +1 -1
- package/src/form_writes_in_flight.js +1 -2
- package/src/g6_nodes_tree_fsm.test.js +33 -0
- package/src/graph_save_plan.js +28 -0
- package/src/graph_save_plan.test.js +36 -2
- package/src/host_drafts.js +2 -3
- package/src/schema_editor_drafts.wiring.test.js +1 -1
- package/src/schema_editor_reload.wiring.test.js +178 -46
- package/src/schema_editor_transport.wiring.test.js +2 -2
- package/src/schema_version_bump.test.js +1 -1
- package/src/shell_modals.js +2 -3
- package/src/shell_toast_once.test.js +10 -10
- package/src/table_cell_text.js +1 -1
- package/src/treedb_graph_writes.wiring.test.js +208 -0
- package/src/treedb_topics_transport.wiring.test.js +80 -12
- package/src/yui_row_search.test.js +1 -1
- package/src/yui_table_select.test.js +1 -1
package/README.md
CHANGED
|
@@ -819,24 +819,29 @@ A write is known by its topic AND its serial (`<topic>^<form_write>`): each
|
|
|
819
819
|
topic's form counts its serials from 1, and keyed by the serial alone two
|
|
820
820
|
forms saving at once shared one entry.
|
|
821
821
|
|
|
822
|
-
**A
|
|
823
|
-
reads its topic again at once, so a cell edited in place goes
|
|
824
|
-
store has. A write that fails while the transport is NOT in
|
|
825
|
-
drop: a routing adapter (gui_agent's
|
|
826
|
-
had in flight when its session closes.
|
|
827
|
-
transport refuses the read (*"cannot route
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
822
|
+
**A drop is followed by a read of every open table** (7.25.13, 7.25.14). A
|
|
823
|
+
refused write reads its topic again at once, so a cell edited in place goes
|
|
824
|
+
back to what the store has. A write that fails while the transport is NOT in
|
|
825
|
+
session is the drop, not a refusal: a routing adapter (gui_agent's
|
|
826
|
+
`C_AGENT_TREEDB_LINK`) settles what it had in flight when its session closes.
|
|
827
|
+
The topic cannot be read then — the transport refuses the read (*"cannot route
|
|
828
|
+
'nodes' -- not in session"*) — so the view logs a warning and waits.
|
|
829
|
+
|
|
830
|
+
A drop also hides the node events published while it lasts: another writer's
|
|
831
|
+
create, update or delete reaches no table. So the disconnect edge marks the
|
|
832
|
+
view, and the first edge that finds the transport in session again reads
|
|
833
|
+
EVERY open table once — as the schema editor reloads its model on the
|
|
834
|
+
reconnect. An `EV_CONNECTION_STATE` "up" that comes before the view's own
|
|
835
|
+
transport is in session does not read; the read waits for an edge that finds
|
|
836
|
+
the transport in session. An "up" with no drop before it reads nothing. A form
|
|
837
|
+
is answered once, also when the edge answered it before the failure arrived.
|
|
834
838
|
|
|
835
839
|
```js
|
|
836
|
-
// Session up
|
|
837
|
-
// Session drops
|
|
840
|
+
// Session up, tables `users` and `roles` open.
|
|
841
|
+
// Session drops -> writes in flight answered refused
|
|
842
|
+
// (another writer creates a user; its EV_TREEDB_NODE_CREATED is lost)
|
|
838
843
|
// EV_TRANSPORT_STATE {connected: true}, transport in session
|
|
839
|
-
//
|
|
844
|
+
// -> `nodes` of users and of roles, once each
|
|
840
845
|
```
|
|
841
846
|
|
|
842
847
|
**The pkey2 of an update goes back as the record had it** (7.25.5). It names
|
|
@@ -1785,6 +1790,25 @@ size. A card on its tier's default now saves its position and nothing else;
|
|
|
1785
1790
|
a closed node saves no size at all (a square is not the card's size), its
|
|
1786
1791
|
entry keeps what it had.
|
|
1787
1792
|
|
|
1793
|
+
**A Save that does not land is written again** (since `7.25.15`). `Save`
|
|
1794
|
+
writes one `__graphs__` record per topic that changed, and nothing answers such
|
|
1795
|
+
a write when it lands, so the engine takes it for granted when it leaves. A
|
|
1796
|
+
refused one was recorded as saved all the same: the next Save found nothing to
|
|
1797
|
+
write, and the arrangement was never stored. Now the host (`C_YUI_TREEDB_GRAPH`)
|
|
1798
|
+
tells the engine every way the write can fail -- the backend answers an error
|
|
1799
|
+
(shown as before), the transport refuses the command, or there is no session
|
|
1800
|
+
(the write is not sent) -- with `EV_GRAPHS_WRITE_REFUSED {topic}`. The engine
|
|
1801
|
+
forgets what it believed the backend holds for that topic
|
|
1802
|
+
(`forget_refused_graphs_write()` in `graph_save_plan.js`), logs a warning and
|
|
1803
|
+
lights Save again, so the next Save writes the topic. A host of its own that
|
|
1804
|
+
hosts `C_G6_NODES_TREE` sends the same event when its write of `__graphs__`
|
|
1805
|
+
fails:
|
|
1806
|
+
|
|
1807
|
+
```js
|
|
1808
|
+
// in the host, when the answer to its update-node of __graphs__ is an error
|
|
1809
|
+
gobj_send_event(engine, "EV_GRAPHS_WRITE_REFUSED", {topic: record.topic}, gobj);
|
|
1810
|
+
```
|
|
1811
|
+
|
|
1788
1812
|
**Every saved look has a way back, in the context menu** (since `7.23.134`,
|
|
1789
1813
|
replacing `reset sizes` / `reset topic sizes`). In edition, the node, the port
|
|
1790
1814
|
and the edge menus each offer three resets — this one, its kind (`reset topic
|
|
@@ -2240,6 +2264,28 @@ else.
|
|
|
2240
2264
|
gobj_send_event(editor, "EV_REFRESH", {}, host); // Save -> "wait for them"
|
|
2241
2265
|
// ... the load lands (model_gen N+1): the form closes, the operator reopens it
|
|
2242
2266
|
```
|
|
2267
|
+
- **A move sent by the host closes the dialog of the screen it left**
|
|
2268
|
+
(7.25.15). `C_YUI_SHELL` keeps the overlays open on a move that changes only
|
|
2269
|
+
the subpath (a url typed in, a link), so a dialog outlived its screen: its
|
|
2270
|
+
Save, its import Preview or an orphan delete sent an event only that screen
|
|
2271
|
+
declares, answered *"Event NOT DEFINED"*, and the edit was lost with no word.
|
|
2272
|
+
Now an `EV_SHOW` that moves the view to another position -- at once, or when
|
|
2273
|
+
a load or a write in flight ends -- closes the column form, the topic form,
|
|
2274
|
+
the import (its plan goes with it) and the orphans, and tells the operator
|
|
2275
|
+
`the view moved: open the dialog again` (an i18n key the consumer's locales
|
|
2276
|
+
carry). The export and the check stay up: they show the texts they were
|
|
2277
|
+
opened with and send nothing a screen declares. The same position sent again
|
|
2278
|
+
closes nothing. A **confirmation** is a shell modal, which the move does not
|
|
2279
|
+
close; it carries the position it was asked on (`seg`), and a Yes answered
|
|
2280
|
+
on another position is refused with the same words. Before, a Yes to "delete
|
|
2281
|
+
this column?" asked on `db/users` and answered after a move to `db2/users`
|
|
2282
|
+
deleted `db2`'s column of the same name.
|
|
2283
|
+
|
|
2284
|
+
```js
|
|
2285
|
+
gobj_send_event(editor, "EV_EDIT_COLUMN", {col: "id"}, host); // on db/users
|
|
2286
|
+
gobj_send_event(editor, "EV_SHOW", {subpath: "db"}, host); // form closed, said
|
|
2287
|
+
gobj_send_event(editor, "EV_SHOW", {subpath: "db"}, host); // same position: nothing
|
|
2288
|
+
```
|
|
2243
2289
|
- **A load refused IN session keeps the model it was replacing** (7.25.9): a
|
|
2244
2290
|
routing adapter's deadline on a slow `nodes` answers -1 while the session
|
|
2245
2291
|
is up. The records are put back, the screen and any open dialog stay, and
|