You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`query`|`str \| int`| — | The persistent query name or serial number (required) |
94
+
|`embed`|`bool`|`False`| Use embed route (`True`) or app/dashboard route (`False`). |
95
+
|`local`|`str \| None`|`None`| User-defined sub-path, query params, and fragment appended after `/local/`. Leading `/` optional. |
96
+
|`replica_slot`|`int \| None`|`None`| Optional replica slot number for the widget route. |
97
97
98
98
### `RoutePath`
99
99
@@ -894,10 +894,10 @@ All routing logic is pure Python. No frontend changes needed. The router reads U
894
894
- Wildcard routes (`*`) have the lowest priority among siblings.
895
895
- Optional segments are matched greedily (present match preferred over absent).
896
896
- Index routes match only the exact parent path.
897
-
7.**Param extraction**: on match, extract `{var_name}` values from the URL segments into a `dict[str, str]`.
898
-
8.**Rendering**: wrap the matched element using the existing `Context` callable: `_route_params_context(matched_element(), value=params)`. This pushes the params onto the context stack so `use_params()` can read them.
899
-
9.**Not found**: if no route matches, render an error element indicating the path was not found.
900
-
10.**Export**`router` from `components/__init__.py`.
897
+
6.**Param extraction**: on match, extract `{var_name}` values from the URL segments into a `dict[str, str]`.
898
+
7.**Rendering**: wrap the matched element using the existing `Context` callable: `_route_params_context(matched_element(), value=params)`. This pushes the params onto the context stack so `use_params()` can read them.
899
+
8.**Not found**: if no route matches, render an error element indicating the path was not found.
900
+
9.**Export**`router` from `components/__init__.py`.
901
901
902
902
#### `use_params`
903
903
@@ -942,8 +942,8 @@ No frontend changes needed — routing logic is entirely in the Python backend.
942
942
- If `local_path`is provided, strip any leading `/`and append `/local/{local_path}`.
943
943
- Include `replica_slot`in the embed path if provided (`{base_url}/iriside/embed/widget/{query}/{widget}/{replica_slot}`).
944
944
945
-
4. **Create `hooks/use_widget_path.py`** that calls `get_context().get_base_url()` to get the base URL, then delegates to `resolve_widget_path(widget_path, base_url)`and returns the resolved string.
946
-
5. **Export**`WidgetPath`and`EnterpriseWidgetPath`from`types/__init__.py`andfrom the top-level `deephaven.ui` namespace. Export `use_widget_path`from`hooks/__init__.py`.
945
+
3. **Create `hooks/use_widget_path.py`** that calls `get_context().get_base_url()` to get the base URL, then delegates to `resolve_widget_path(widget_path, base_url)`and returns the resolved string.
946
+
4. **Export**`WidgetPath`and`EnterpriseWidgetPath`from`types/__init__.py`andfrom the top-level `deephaven.ui` namespace. Export `use_widget_path`from`hooks/__init__.py`.
947
947
948
948
### Frontend (TypeScript)
949
949
@@ -959,16 +959,16 @@ No frontend changes needed — routing logic is entirely in the Python backend.
0 commit comments