Skip to content

Commit 78b5460

Browse files
committed
Adding notifications
1 parent 5a89e2c commit 78b5460

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

shiny/api-examples/insert_nav_panel/app-core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,7 @@ def _():
4646
position="before",
4747
)
4848

49+
ui.notification_show(f"Added tab to menu: {id}")
50+
4951

5052
app = App(app_ui, server)

shiny/api-examples/insert_nav_panel/app-express.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ def _():
4040
def _():
4141
id = "Dynamic-" + str(input.add())
4242
ui.insert_nav_panel("tabs", title=id, value=id, target="s2", position="before")
43+
ui.notification_show(f"Added tab to menu: {id}")

tests/playwright/shiny/components/dynamic_navs/app.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ def server(input: Inputs, output: Outputs, session: Session):
2828

2929
@reactive.effect
3030
def _():
31-
ui.insert_nav_panel(
32-
"tabs",
33-
"Stringy Panel",
34-
target="Foo",
35-
position="before",
36-
)
3731
ui.insert_nav_panel(
3832
"tabs",
3933
"Stringier Panel",

tests/playwright/shiny/components/dynamic_navs/test_navs_dynamic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ def test_dynamic_navs(page: Page, local_app: ShinyAppProc) -> None:
99
page.goto(local_app.url)
1010

1111
# String insertion as panels worked correctly
12-
expect(page.get_by_text("Stringy Panel")).to_be_visible()
1312
page.get_by_role("button", name="Menu", exact=True).click()
1413
expect(page.get_by_text("Stringier Panel")).to_be_visible()
1514
page.get_by_role("button", name="Menu", exact=True).click()

0 commit comments

Comments
 (0)