@yuneta/gobj-ui 7.26.4 → 7.26.5

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.
@@ -76294,8 +76294,29 @@ function ac_select_topic(gobj, event, kw, src) {
76294
76294
  go(gobj, gobj.priv.treedb_id, kw.topic, false, true);
76295
76295
  return reload_after_move(gobj);
76296
76296
  }
76297
+ /***************************************************************
76298
+ * «←»: where browser Back goes, the route before this one.
76299
+ *
76300
+ * It went UP a level (columns -> topics -> treedbs) whatever came
76301
+ * before, and Back undoes the last move: after two topics opened from
76302
+ * the diagram, Back returned to the first one and the arrow to the
76303
+ * treedb (2026-10-10). The rule is that both land on the same place.
76304
+ *
76305
+ * The exception to "this view navigates nothing itself" is this one
76306
+ * control, like the topics view's arrow: it asks the shell, which is
76307
+ * what remembers. Only with a route of its own: mounted without one
76308
+ * (in a window), the route before is the APP's, behind the editor, and
76309
+ * the arrow keeps going up a level. Up a level too when the page has
76310
+ * not moved.
76311
+ ***************************************************************/
76297
76312
  function ac_back(gobj, event, kw, src) {
76298
76313
  let priv = gobj.priv;
76314
+ let shell = (0, _yuneta_gobj_js.gobj_read_attr)(gobj, "base_route") ? yui_shell_of(gobj) : null;
76315
+ let came_from = shell ? yui_shell_previous_route(shell) : "";
76316
+ if (came_from) {
76317
+ yui_shell_navigate(shell, came_from, { push: true });
76318
+ return 0;
76319
+ }
76299
76320
  if (priv.diagram || priv.topic_name) go(gobj, priv.treedb_id, "", false, true);
76300
76321
  else go(gobj, "", "", false, true);
76301
76322
  return reload_after_move(gobj);
@@ -76289,8 +76289,29 @@ function ac_select_topic(gobj, event, kw, src) {
76289
76289
  go(gobj, gobj.priv.treedb_id, kw.topic, false, true);
76290
76290
  return reload_after_move(gobj);
76291
76291
  }
76292
+ /***************************************************************
76293
+ * «←»: where browser Back goes, the route before this one.
76294
+ *
76295
+ * It went UP a level (columns -> topics -> treedbs) whatever came
76296
+ * before, and Back undoes the last move: after two topics opened from
76297
+ * the diagram, Back returned to the first one and the arrow to the
76298
+ * treedb (2026-10-10). The rule is that both land on the same place.
76299
+ *
76300
+ * The exception to "this view navigates nothing itself" is this one
76301
+ * control, like the topics view's arrow: it asks the shell, which is
76302
+ * what remembers. Only with a route of its own: mounted without one
76303
+ * (in a window), the route before is the APP's, behind the editor, and
76304
+ * the arrow keeps going up a level. Up a level too when the page has
76305
+ * not moved.
76306
+ ***************************************************************/
76292
76307
  function ac_back(gobj, event, kw, src) {
76293
76308
  let priv = gobj.priv;
76309
+ let shell = gobj_read_attr(gobj, "base_route") ? yui_shell_of(gobj) : null;
76310
+ let came_from = shell ? yui_shell_previous_route(shell) : "";
76311
+ if (came_from) {
76312
+ yui_shell_navigate(shell, came_from, { push: true });
76313
+ return 0;
76314
+ }
76294
76315
  if (priv.diagram || priv.topic_name) go(gobj, priv.treedb_id, "", false, true);
76295
76316
  else go(gobj, "", "", false, true);
76296
76317
  return reload_after_move(gobj);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuneta/gobj-ui",
3
- "version": "7.26.4",
3
+ "version": "7.26.5",
4
4
  "type": "module",
5
5
  "main": "dist/gobj-ui.cjs.js",
6
6
  "module": "dist/gobj-ui.es.js",
@@ -149,7 +149,7 @@ import {grouped_flags, toggle_flag} from "./schema_flags.js";
149
149
  import {write_command, write_options} from "./schema_write_options.js";
150
150
  import {COL_TYPES} from "./schema_validate.js";
151
151
 
152
- import {yui_shell_of} from "./c_yui_shell.js";
152
+ import {yui_shell_of, yui_shell_navigate, yui_shell_previous_route} from "./c_yui_shell.js";
153
153
  import {
154
154
  yui_shell_show_modal,
155
155
  yui_shell_show_error,
@@ -3830,10 +3830,32 @@ function ac_select_topic(gobj, event, kw, src)
3830
3830
  return reload_after_move(gobj);
3831
3831
  }
3832
3832
 
3833
+ /***************************************************************
3834
+ * «←»: where browser Back goes, the route before this one.
3835
+ *
3836
+ * It went UP a level (columns -> topics -> treedbs) whatever came
3837
+ * before, and Back undoes the last move: after two topics opened from
3838
+ * the diagram, Back returned to the first one and the arrow to the
3839
+ * treedb (2026-10-10). The rule is that both land on the same place.
3840
+ *
3841
+ * The exception to "this view navigates nothing itself" is this one
3842
+ * control, like the topics view's arrow: it asks the shell, which is
3843
+ * what remembers. Only with a route of its own: mounted without one
3844
+ * (in a window), the route before is the APP's, behind the editor, and
3845
+ * the arrow keeps going up a level. Up a level too when the page has
3846
+ * not moved.
3847
+ ***************************************************************/
3833
3848
  function ac_back(gobj, event, kw, src)
3834
3849
  {
3835
3850
  let priv = gobj.priv;
3836
3851
 
3852
+ let shell = gobj_read_attr(gobj, "base_route") ? yui_shell_of(gobj) : null;
3853
+ let came_from = shell ? yui_shell_previous_route(shell) : "";
3854
+ if(came_from) {
3855
+ yui_shell_navigate(shell, came_from, {push: true});
3856
+ return 0;
3857
+ }
3858
+
3837
3859
  if(priv.diagram || priv.topic_name) {
3838
3860
  go(gobj, priv.treedb_id, "", false, true);
3839
3861
  } else {