From 4001737cc7a69b44ff551e432899a41b855872a6 Mon Sep 17 00:00:00 2001
From: Fabien Lelaquais <86590727+FabienLelaquais@users.noreply.github.com>
Date: Mon, 22 Jul 2024 11:46:38 +0200
Subject: [PATCH] Adapt to new doc structure (#1562)
---
taipy/gui/__init__.py | 4 ++--
taipy/gui/gui.py | 8 +++-----
taipy/gui/icon.py | 4 ++--
taipy/gui/partial.py | 6 +++---
tools/gui/generate_pyi.py | 2 +-
5 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/taipy/gui/__init__.py b/taipy/gui/__init__.py
index 7cbe44ff30..b8574e7acc 100644
--- a/taipy/gui/__init__.py
+++ b/taipy/gui/__init__.py
@@ -46,8 +46,8 @@
add functionality to Taipy GUI:
- [`python-magic`](https://pypi.org/project/python-magic/): identifies image format
- from byte buffers so the [`image`](../../../userman/gui/viselements/standard-and-blocks/image.md) control can
- display them, and so that [`file_download`](../../../userman/gui/viselements/standard-and-blocks/file_download.md)
+ from byte buffers so the [`image`](../../../userman/gui/viselements/generic/image.md) control can
+ display them, and so that [`file_download`](../../../userman/gui/viselements/generic/file_download.md)
can request the browser to display the image content when relevant.
You can install that package with the regular `pip install python-magic` command
(then potentially `pip install python-magic` on Windows),
diff --git a/taipy/gui/gui.py b/taipy/gui/gui.py
index 799f794a70..945ff0a36e 100644
--- a/taipy/gui/gui.py
+++ b/taipy/gui/gui.py
@@ -1555,7 +1555,6 @@ def broadcast_callback(
variable reflected in the user interface.
Arguments:
- gui (Gui^): The current Gui instance.
callback: The user-defined function to be invoked.
The first parameter of this function must be a `State^` object representing the
client for which it is invoked.
@@ -1577,7 +1576,6 @@ def broadcast_change(self, var_name: str, value: t.Any):
instance. All user interfaces reflect the change.
Arguments:
- gui (Gui^): The current Gui instance.
var_name: The name of the variable to change.
value: The new value for the variable.
"""
@@ -1600,9 +1598,9 @@ def broadcast_changes(self, values: t.Optional[dict[str, t.Any]] = None, **kwarg
values: An optional dictionary where each key is the name of a variable to change, and
where the associated value is the new value to set for that variable, in each state
for the application.
- **kwargs: A collection of variable name-value pairs that are updated for each state of
- the application. Name-value pairs overload the ones in *values* if the name exists
- as a key in the dictionary.
+ **kwargs (dict[str, any]): A collection of variable name-value pairs that are updated
+ for each state of the application. Name-value pairs overload the ones in *values*
+ if the name exists as a key in the dictionary.
"""
if kwargs:
values = values.copy() if values else {}
diff --git a/taipy/gui/icon.py b/taipy/gui/icon.py
index 3ffe5a3f76..8146735885 100644
--- a/taipy/gui/icon.py
+++ b/taipy/gui/icon.py
@@ -15,8 +15,8 @@
class Icon:
"""Small image in the User Interface.
- Icons are typically used in controls like [button](../../userman/gui/viselements/standard-and-blocks/button.md)
- or items in a [menu](../../userman/gui/viselements/standard-and-blocks/menu.md).
+ Icons are typically used in controls like [button](../../userman/gui/viselements/generic/button.md)
+ or items in a [menu](../../userman/gui/viselements/generic/menu.md).
Attributes:
path (str): The path to the image file.
diff --git a/taipy/gui/partial.py b/taipy/gui/partial.py
index 4fcbc700b2..9b0ab0dd48 100644
--- a/taipy/gui/partial.py
+++ b/taipy/gui/partial.py
@@ -28,9 +28,9 @@ class Partial(_Page):
and not related pages. This allows not to have to repeat yourself when
creating your page templates.
- Visual elements such as [`part`](../../userman/gui/viselements/standard-and-blocks/part.md),
- [`dialog`](../..//userman/gui/viselements/standard-and-blocks/dialog.md) or
- [`pane`](../../userman/gui/viselements/standard-and-blocks/pane.md) can use Partials.
+ Visual elements such as [`part`](../../userman/gui/viselements/generic/part.md),
+ [`dialog`](../..//userman/gui/viselements/generic/dialog.md) or
+ [`pane`](../../userman/gui/viselements/generic/pane.md) can use Partials.
Note that `Partial` has no constructor (no `__init__()` method): to create a
`Partial`, you must call the `Gui.add_partial()^` function.
diff --git a/tools/gui/generate_pyi.py b/tools/gui/generate_pyi.py
index 9716a0c8be..531b8d1ca6 100644
--- a/tools/gui/generate_pyi.py
+++ b/tools/gui/generate_pyi.py
@@ -59,7 +59,7 @@
current_version = "develop"
else:
current_version = f'release-{version.get("major", 0)}.{version.get("minor", 0)}'
-taipy_doc_url = f"https://docs.taipy.io/en/{current_version}/manuals/userman/gui/viselements/standard-and-blocks/"
+taipy_doc_url = f"https://docs.taipy.io/en/{current_version}/manuals/userman/gui/viselements/generic/"
# ############################################################