From 5e8fa1280fdfba22668c4b246d70d1ba85e88ecd Mon Sep 17 00:00:00 2001 From: Jim Taysom Date: Thu, 21 Apr 2022 19:38:35 -0400 Subject: [PATCH 1/2] Update good_conditional_todo_list.py The checkmark was on the wrong list items compared to the more verbose example. --- .../_examples/good_conditional_todo_list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/guides/creating-interfaces/your-first-components/_examples/good_conditional_todo_list.py b/docs/source/guides/creating-interfaces/your-first-components/_examples/good_conditional_todo_list.py index 64d6f6813..f01753d40 100644 --- a/docs/source/guides/creating-interfaces/your-first-components/_examples/good_conditional_todo_list.py +++ b/docs/source/guides/creating-interfaces/your-first-components/_examples/good_conditional_todo_list.py @@ -3,7 +3,7 @@ @component def Item(name, done): - return html.li(name, "" if done else " ✔") + return html.li(name, " ✔" if done else "") @component From d2a569d27f915d3b2b1fc6eb8eef9aca3a6d9343 Mon Sep 17 00:00:00 2001 From: Jim Taysom Date: Thu, 21 Apr 2022 19:58:19 -0400 Subject: [PATCH 2/2] Update main.py fixed typo. It was rendering `1 or 10` instead of `1 of 10` --- .../_examples/adding_state_variable/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/guides/adding-interactivity/components-with-state/_examples/adding_state_variable/main.py b/docs/source/guides/adding-interactivity/components-with-state/_examples/adding_state_variable/main.py index 5a96d2f03..724831f89 100644 --- a/docs/source/guides/adding-interactivity/components-with-state/_examples/adding_state_variable/main.py +++ b/docs/source/guides/adding-interactivity/components-with-state/_examples/adding_state_variable/main.py @@ -27,7 +27,7 @@ def handle_click(event): return html.div( html.button({"onClick": handle_click}, "Next"), html.h2(name, " by ", artist), - html.p(f"({bounded_index + 1} or {len(sculpture_data)})"), + html.p(f"({bounded_index + 1} of {len(sculpture_data)})"), html.img({"src": url, "alt": alt, "style": {"height": "200px"}}), html.p(description), )