From 87af964e75e0f5edd3d5a49d12874868ef619458 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 1 Dec 2024 22:20:00 -0700 Subject: [PATCH 01/17] docs update code warining --- .../components/status/warning.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 6ecd79467..7c027c728 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -21,27 +21,27 @@ def Page(): dense, set_dense = solara.use_state(False) outlined, set_outlined = solara.use_state(True) text, set_text = solara.use_state(True) - with solara.VBox() as main: - with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) - solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) - solara.Checkbox(label="Show as text", value=text, on_value=set_text) - solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) - return main + + with solara.GridFixed(4): + solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) + solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) + solara.Checkbox(label="Show as text", value=text, on_value=set_text) + solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) + solara.Warning( + f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", + text=text, + dense=dense, + outlined=outlined, + icon=icon, + ) + solara.Warning( + f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", + text=text, + dense=dense, + outlined=outlined, + icon=icon, + ) + __doc__ += apidoc(solara.Warning.f) # type: ignore From b3ef1901775ce76c11c1946e1e043b2903601ace Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 05:21:24 +0000 Subject: [PATCH 02/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../website/pages/documentation/components/status/warning.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 7c027c728..586e9b9cb 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -21,7 +21,7 @@ def Page(): dense, set_dense = solara.use_state(False) outlined, set_outlined = solara.use_state(True) text, set_text = solara.use_state(True) - + with solara.GridFixed(4): solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) @@ -43,5 +43,4 @@ def Page(): ) - __doc__ += apidoc(solara.Warning.f) # type: ignore From e62def374854659846f57ff76123b1eea3a4f107 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 16:49:23 -0700 Subject: [PATCH 03/17] fix code in warning-1 --- .../components/status/warning.py | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 586e9b9cb..39b4e9134 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -17,30 +17,27 @@ @solara.component def Page(): - icon, set_icon = solara.use_state(True) - dense, set_dense = solara.use_state(False) - outlined, set_outlined = solara.use_state(True) - text, set_text = solara.use_state(True) - + state = solara.use_reactive({ + "icon": True, + "dense": False, + "outlined": True, + "text": True, + }) + with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) - solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) - solara.Checkbox(label="Show as text", value=text, on_value=set_text) - solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) + solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.update({"outlined": val})) + solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, + f"This is solara.Warning(label='...', text={state['text']}, dense={state['dense']}, outlined={state['outlined']}, icon={state['icon']})", + text=state["text"], + dense=state["dense"], + outlined=state["outlined"], + icon=state["icon"], ) + __doc__ += apidoc(solara.Warning.f) # type: ignore From 4f543d8941046d560f8097a828fa800f472d0b22 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 8 Dec 2024 23:56:17 +0000 Subject: [PATCH 04/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../components/status/warning.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 39b4e9134..d34cc9ca4 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -17,19 +17,21 @@ @solara.component def Page(): - state = solara.use_reactive({ - "icon": True, - "dense": False, - "outlined": True, - "text": True, - }) - + state = solara.use_reactive( + { + "icon": True, + "dense": False, + "outlined": True, + "text": True, + } + ) + with solara.GridFixed(4): solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.update({"icon": val})) solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.update({"dense": val})) solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.update({"text": val})) solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.update({"outlined": val})) - + solara.Warning( f"This is solara.Warning(label='...', text={state['text']}, dense={state['dense']}, outlined={state['outlined']}, icon={state['icon']})", text=state["text"], @@ -39,5 +41,4 @@ def Page(): ) - __doc__ += apidoc(solara.Warning.f) # type: ignore From 61a72efac901e40334a70541255579eb30b97106 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 17:05:58 -0700 Subject: [PATCH 05/17] fix code in warning-2 --- .../documentation/components/status/warning.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 39b4e9134..fd6ce4670 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -25,17 +25,17 @@ def Page(): }) with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.update({"icon": val})) - solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.update({"dense": val})) - solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.update({"text": val})) - solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.update({"outlined": val})) + solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.value.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.value.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.value.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.value.update({"outlined": val})) solara.Warning( - f"This is solara.Warning(label='...', text={state['text']}, dense={state['dense']}, outlined={state['outlined']}, icon={state['icon']})", - text=state["text"], - dense=state["dense"], - outlined=state["outlined"], - icon=state["icon"], + f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", + text=state.value.update["text"], + dense=state.value.update["dense"], + outlined=state.value.update["outlined"], + icon=state.value.update["icon"], ) From 3775f62bc8107d02d020832f4cba1436127028db Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:09:24 +0000 Subject: [PATCH 06/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- solara/website/pages/documentation/components/status/warning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 47b1ea212..46afdbeb8 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -31,7 +31,7 @@ def Page(): solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.value.update({"dense": val})) solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.value.update({"text": val})) solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.value.update({"outlined": val})) - + solara.Warning( f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", text=state.value.update["text"], From de7c693bb02f95497091a4fc830b6962300a7bad Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 17:15:46 -0700 Subject: [PATCH 07/17] fix code in warning-3 --- .../documentation/components/status/warning.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 47b1ea212..8071a9ab7 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -27,17 +27,17 @@ def Page(): ) with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.value.update({"icon": val})) - solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.value.update({"dense": val})) - solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.value.update({"text": val})) - solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.value.update({"outlined": val})) + solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state.value["dense"], on_value=lambda val: state.value.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state.value["text"], on_value=lambda val: state.value.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state.value["outlined"], on_value=lambda val: state.value.update({"outlined": val})) solara.Warning( f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", - text=state.value.update["text"], - dense=state.value.update["dense"], - outlined=state.value.update["outlined"], - icon=state.value.update["icon"], + text=state.value["text"], + dense=state.value["dense"], + outlined=state.value["outlined"], + icon=state.value["icon"], ) From bc41aec50d58ed6bdba0c317d81f92898b7d637a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 00:18:54 +0000 Subject: [PATCH 08/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- solara/website/pages/documentation/components/status/warning.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 8071a9ab7..381bb0ba8 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -31,7 +31,7 @@ def Page(): solara.Checkbox(label="Show dense", value=state.value["dense"], on_value=lambda val: state.value.update({"dense": val})) solara.Checkbox(label="Show as text", value=state.value["text"], on_value=lambda val: state.value.update({"text": val})) solara.Checkbox(label="Show outlined", value=state.value["outlined"], on_value=lambda val: state.value.update({"outlined": val})) - + solara.Warning( f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", text=state.value["text"], From 3d2dba68c9feaa1a86cba06215707e51c8e297a3 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 1 Dec 2024 22:20:00 -0700 Subject: [PATCH 09/17] docs update code warining --- .../components/status/warning.py | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 6ecd79467..7c027c728 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -21,27 +21,27 @@ def Page(): dense, set_dense = solara.use_state(False) outlined, set_outlined = solara.use_state(True) text, set_text = solara.use_state(True) - with solara.VBox() as main: - with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) - solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) - solara.Checkbox(label="Show as text", value=text, on_value=set_text) - solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) - return main + + with solara.GridFixed(4): + solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) + solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) + solara.Checkbox(label="Show as text", value=text, on_value=set_text) + solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) + solara.Warning( + f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", + text=text, + dense=dense, + outlined=outlined, + icon=icon, + ) + solara.Warning( + f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", + text=text, + dense=dense, + outlined=outlined, + icon=icon, + ) + __doc__ += apidoc(solara.Warning.f) # type: ignore From de4bf386819ddf9a418c08909424a3e58a73dbbe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 05:21:24 +0000 Subject: [PATCH 10/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../website/pages/documentation/components/status/warning.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 7c027c728..586e9b9cb 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -21,7 +21,7 @@ def Page(): dense, set_dense = solara.use_state(False) outlined, set_outlined = solara.use_state(True) text, set_text = solara.use_state(True) - + with solara.GridFixed(4): solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) @@ -43,5 +43,4 @@ def Page(): ) - __doc__ += apidoc(solara.Warning.f) # type: ignore From 57637905ba154111cab8378a75cc4a780a2ce4eb Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 16:49:23 -0700 Subject: [PATCH 11/17] fix code in warning-1 --- .../components/status/warning.py | 39 +++++++++---------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 586e9b9cb..39b4e9134 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -17,30 +17,27 @@ @solara.component def Page(): - icon, set_icon = solara.use_state(True) - dense, set_dense = solara.use_state(False) - outlined, set_outlined = solara.use_state(True) - text, set_text = solara.use_state(True) - + state = solara.use_reactive({ + "icon": True, + "dense": False, + "outlined": True, + "text": True, + }) + with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=icon, on_value=set_icon) - solara.Checkbox(label="Show dense", value=dense, on_value=set_dense) - solara.Checkbox(label="Show as text", value=text, on_value=set_text) - solara.Checkbox(label="Show outlined", value=outlined, on_value=set_outlined) - solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, - ) + solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.update({"outlined": val})) + solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, + f"This is solara.Warning(label='...', text={state['text']}, dense={state['dense']}, outlined={state['outlined']}, icon={state['icon']})", + text=state["text"], + dense=state["dense"], + outlined=state["outlined"], + icon=state["icon"], ) + __doc__ += apidoc(solara.Warning.f) # type: ignore From afa721e0cc3187be180ef2975a95c876a5c63f2b Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 17:05:58 -0700 Subject: [PATCH 12/17] fix code in warning-2 --- .../documentation/components/status/warning.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 39b4e9134..fd6ce4670 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -25,17 +25,17 @@ def Page(): }) with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.update({"icon": val})) - solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.update({"dense": val})) - solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.update({"text": val})) - solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.update({"outlined": val})) + solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.value.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.value.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.value.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.value.update({"outlined": val})) solara.Warning( - f"This is solara.Warning(label='...', text={state['text']}, dense={state['dense']}, outlined={state['outlined']}, icon={state['icon']})", - text=state["text"], - dense=state["dense"], - outlined=state["outlined"], - icon=state["icon"], + f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", + text=state.value.update["text"], + dense=state.value.update["dense"], + outlined=state.value.update["outlined"], + icon=state.value.update["icon"], ) From 47aa8e310c7c1306edbd8600d4f4a3dc16252360 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 8 Dec 2024 17:15:46 -0700 Subject: [PATCH 13/17] fix code in warning-3 --- .../documentation/components/status/warning.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index fd6ce4670..c6e0a41d3 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -25,17 +25,17 @@ def Page(): }) with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=state["icon"], on_value=lambda val: state.value.update({"icon": val})) - solara.Checkbox(label="Show dense", value=state["dense"], on_value=lambda val: state.value.update({"dense": val})) - solara.Checkbox(label="Show as text", value=state["text"], on_value=lambda val: state.value.update({"text": val})) - solara.Checkbox(label="Show outlined", value=state["outlined"], on_value=lambda val: state.value.update({"outlined": val})) + solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) + solara.Checkbox(label="Show dense", value=state.value["dense"], on_value=lambda val: state.value.update({"dense": val})) + solara.Checkbox(label="Show as text", value=state.value["text"], on_value=lambda val: state.value.update({"text": val})) + solara.Checkbox(label="Show outlined", value=state.value["outlined"], on_value=lambda val: state.value.update({"outlined": val})) solara.Warning( f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", - text=state.value.update["text"], - dense=state.value.update["dense"], - outlined=state.value.update["outlined"], - icon=state.value.update["icon"], + text=state.value["text"], + dense=state.value["dense"], + outlined=state.value["outlined"], + icon=state.value["icon"], ) From 0a954c6177837ba24f647b0a95c97ac66e3efb81 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 22 Dec 2024 21:17:26 -0700 Subject: [PATCH 14/17] update code in warning-4 --- .../components/status/warning.py | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index c6e0a41d3..665f43484 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -17,25 +17,24 @@ @solara.component def Page(): - state = solara.use_reactive({ - "icon": True, - "dense": False, - "outlined": True, - "text": True, - }) + icon = solara.use_reactive(True) + dense = solara.use_reactive(False) + outlined = solara.use_reactive(True) + text = solara.use_reactive(True) with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=state.value["icon"], on_value=lambda val: state.value.update({"icon": val})) - solara.Checkbox(label="Show dense", value=state.value["dense"], on_value=lambda val: state.value.update({"dense": val})) - solara.Checkbox(label="Show as text", value=state.value["text"], on_value=lambda val: state.value.update({"text": val})) - solara.Checkbox(label="Show outlined", value=state.value["outlined"], on_value=lambda val: state.value.update({"outlined": val})) + + solara.Checkbox(label="Use icon", value=icon) + solara.Checkbox(label="Show dense", value=dense) + solara.Checkbox(label="Show as text", value=text) + solara.Checkbox(label="Show outlined", value=outlined) solara.Warning( - f"This is solara.Warning(label='...', text={state.value['text']}, dense={state.value['dense']}, outlined={state.value['outlined']}, icon={state.value['icon']})", - text=state.value["text"], - dense=state.value["dense"], - outlined=state.value["outlined"], - icon=state.value["icon"], + f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", + text=text, + dense=dense, + outlined=outlined, + icon=icon, ) From c878529fe7197e9b892e0c8b5d4ab7a42881fb62 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 04:21:24 +0000 Subject: [PATCH 15/17] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- solara/mkdocs.yml | 2 +- .../pages/documentation/components/status/warning.py | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/solara/mkdocs.yml b/solara/mkdocs.yml index f72c5c166..ef30e021c 100644 --- a/solara/mkdocs.yml +++ b/solara/mkdocs.yml @@ -18,4 +18,4 @@ markdown_extensions: link_text: | **Run and edit this code in Py.Cafe** - pymdownx.snippets: - url_download: true \ No newline at end of file + url_download: true diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 665f43484..644c59dcc 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -21,14 +21,13 @@ def Page(): dense = solara.use_reactive(False) outlined = solara.use_reactive(True) text = solara.use_reactive(True) - + with solara.GridFixed(4): - solara.Checkbox(label="Use icon", value=icon) solara.Checkbox(label="Show dense", value=dense) solara.Checkbox(label="Show as text", value=text) solara.Checkbox(label="Show outlined", value=outlined) - + solara.Warning( f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", text=text, @@ -38,5 +37,4 @@ def Page(): ) - __doc__ += apidoc(solara.Warning.f) # type: ignore From 5fd37259a184fe1bfd30a0e5c091f6d0aa6adb59 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 22 Dec 2024 21:26:52 -0700 Subject: [PATCH 16/17] update code in warning-5 --- solara/mkdocs.yml | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 solara/mkdocs.yml diff --git a/solara/mkdocs.yml b/solara/mkdocs.yml deleted file mode 100644 index f72c5c166..000000000 --- a/solara/mkdocs.yml +++ /dev/null @@ -1,21 +0,0 @@ -site_name: PyCafe plugin for MkDocs -site_url: https://mkdocs.py.cafe -docs_dir: "website" -theme: - name: material -markdown_extensions: - - pymdownx.superfences: - custom_fences: - - name: python - class: 'highlight' - validator: !!python/name:mkdocs_pycafe.validator - format: !!python/object/apply:mkdocs_pycafe.formatter - kwds: - type: solara - requirements: | - altair - anywidget - link_text: | - **Run and edit this code in Py.Cafe** - - pymdownx.snippets: - url_download: true \ No newline at end of file From 2c822f264a8e258c66a9b616af9b4c0acc037af2 Mon Sep 17 00:00:00 2001 From: lizzy985 Date: Sun, 5 Jan 2025 08:51:07 -0700 Subject: [PATCH 17/17] docs_update_code_warining_7 --- .../pages/documentation/components/status/warning.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/solara/website/pages/documentation/components/status/warning.py b/solara/website/pages/documentation/components/status/warning.py index 644c59dcc..a2449bb37 100644 --- a/solara/website/pages/documentation/components/status/warning.py +++ b/solara/website/pages/documentation/components/status/warning.py @@ -29,11 +29,11 @@ def Page(): solara.Checkbox(label="Show outlined", value=outlined) solara.Warning( - f"This is solara.Warning(label='...', text={text}, dense={dense}, outlined={outlined}, icon={icon})", - text=text, - dense=dense, - outlined=outlined, - icon=icon, + f"This is solara.Warning(label='...', text={text.value}, dense={dense.value}, outlined={outlined.value}, icon={icon.value})", + text=text.value, + dense=dense.value, + outlined=outlined.value, + icon=icon.value, )