Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3ecc0e6
chore: Use `bslib@feat/toasts` and upgrade html deps
gadenbuie Oct 28, 2025
2b6185b
feat: Add toast notification system
gadenbuie Oct 28, 2025
b068dfc
feat: Add toast API examples and comprehensive unit tests
gadenbuie Oct 28, 2025
ceac34a
feat: Add Toast Playwright controller and end-to-end tests
gadenbuie Oct 28, 2025
1cbcba4
docs: Add toast documentation to CHANGELOG and quartodoc configs
gadenbuie Oct 28, 2025
142c190
fix: Fix type error in toast unit test
gadenbuie Oct 28, 2025
2c135e6
feat: Update toast example apps to match R demo
gadenbuie Oct 28, 2025
10c2b65
fix: fixup custom message sending
gadenbuie Oct 28, 2025
92f6502
fix: make sure close button is included correctly
gadenbuie Oct 28, 2025
8678b3a
fix(example): Fixup spacing in text output
gadenbuie Oct 28, 2025
501ee91
fix: Fixup example apps
gadenbuie Oct 29, 2025
109ed03
feat: Add `icon` parameter to `toast()`
gadenbuie Oct 29, 2025
95fbb18
chore: make upgrade-html-deps
gadenbuie Oct 29, 2025
abd988d
chore: make upgrade-html-deps
gadenbuie Nov 3, 2025
db67611
chore(toast): Take `duration_s`, store in Toast object as `duration` …
gadenbuie Nov 3, 2025
114c8b4
chore: Reorganize code, don't fill in toast id on creation
gadenbuie Nov 3, 2025
b21c2cc
refactor: Move show_toast() logic into `as_payload()` method
gadenbuie Nov 3, 2025
100b5ff
feat(express): Make toast/toast_header public from shiny.express.ui
gadenbuie Nov 3, 2025
fcdc2d9
fix: inspect-ai requires Python >= 3.10 (#2110)
gadenbuie Nov 3, 2025
7305503
Merge branch 'main' into feat/toasts
gadenbuie Nov 3, 2025
bf1d566
fix: No `id` is required
gadenbuie Nov 3, 2025
76e60e0
tests: fix playwright tests
gadenbuie Nov 3, 2025
0ed7cd5
chore: small convenience updates to Toast controller
gadenbuie Nov 4, 2025
060e34a
chore: make check-fix
gadenbuie Nov 4, 2025
fe7dbf2
docs: Add example to `toast_header()`
gadenbuie Nov 5, 2025
174e3ff
docs: Update doc strings
gadenbuie Nov 5, 2025
8d551a4
chore: format
gadenbuie Nov 5, 2025
f5760b5
fix: restore accidentally deleted line
gadenbuie Nov 5, 2025
cfa6a26
fix: override or generate a random ID in toast tagify method
gadenbuie Nov 5, 2025
51b6fb2
fix: Use internal typing extensions helpers to avoid type issues on P…
gadenbuie Nov 5, 2025
4baddf1
chore: make format
gadenbuie Nov 5, 2025
648597c
docs(toast_header): There's an example in `toast()`
gadenbuie Nov 5, 2025
d9510cd
chore: format
gadenbuie Nov 5, 2025
0b7d26d
docs: fixup examples
gadenbuie Nov 5, 2025
5a4f657
tests: Don't test for bootstrap classes
gadenbuie Nov 5, 2025
7f772d0
tests: Add snapshot tests
gadenbuie Nov 5, 2025
1573bd9
chore: WHY FORMATTING WHY WHY WHY
gadenbuie Nov 5, 2025
38d5c3a
chore: Apply suggestions from code review
gadenbuie Nov 6, 2025
1290f77
chore: remove claude settings file
gadenbuie Nov 6, 2025
eea3496
docs: Add toast and toast_header to express index
gadenbuie Nov 6, 2025
ace163a
fix(show_toast): Accept toast, str, Tag and TagList
gadenbuie Nov 6, 2025
6009fc0
chore: better comments everywhere
gadenbuie Nov 6, 2025
3fc7afc
refactor: simplify building header tag
gadenbuie Nov 6, 2025
3464f1a
fix(toast_header): Use `TagNode` rather than `TagChild`
gadenbuie Nov 6, 2025
b59e982
chore: no normalize type abstraction
gadenbuie Nov 6, 2025
09a88cc
fix: correct check for `is_tag_node()`
gadenbuie Nov 6, 2025
a5b5c67
refactor: Restore `_normalize_toast_type()` as a helper function
gadenbuie Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ test-results.xml
results-inspect-ai/
test-results-inspect-ai/
tests/inspect-ai/scripts/test_metadata.json
/.claude/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### New features

* Added toast notification system with `ui.toast()`, `ui.toast_header()`, `ui.show_toast()`, and `ui.hide_toast()`. Toast notifications are temporary, non-intrusive messages that support multiple semantic types (success, warning, error, etc.), flexible positioning (9 positions: top/middle/bottom × left/center/right), auto-hide with configurable duration, optional headers with icons, and programmatic control. (#2111)

* Added a new `input_submit_textarea()` input element, which is similar to `input_text_area()`, but includes a submit button to only submit the text changes to the server on click. This is especially useful when the input text change triggers a long-running operation and/or the user wants to type longer-form input and review it before submitting it. (#2099)

### Bug fixes
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ format-isort: FORCE
@echo "-------- Sorting imports with isort --------"
isort .

test-update-snapshots: FORCE ## Update test snapshots
@echo "-------- Updating test snapshots ----------"
pytest --snapshot-update

docs: FORCE ## docs: build docs with quartodoc
@echo "-------- Building docs with quartodoc ------"
@cd docs && make quartodoc
Expand Down
4 changes: 4 additions & 0 deletions docs/_quartodoc-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ quartodoc:
- ui.help_text
- ui.notification_show
- ui.notification_remove
- ui.toast
- ui.toast_header
- ui.show_toast
- ui.hide_toast
- ui.modal
- ui.modal_show
- ui.modal_remove
Expand Down
4 changes: 4 additions & 0 deletions docs/_quartodoc-express.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ quartodoc:
- express.ui.help_text
- express.ui.notification_show
- express.ui.notification_remove
- express.ui.toast
- express.ui.toast_header
- express.ui.show_toast
- express.ui.hide_toast
- express.ui.modal
- express.ui.modal_show
- express.ui.modal_remove
Expand Down
1 change: 1 addition & 0 deletions docs/_quartodoc-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ quartodoc:
- playwright.controller.Card
- playwright.controller.Popover
- playwright.controller.Sidebar
- playwright.controller.Toast
- playwright.controller.Tooltip
- title: UI Inputs
desc: Methods for interacting with Shiny app input value controller.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ add-test = [
"chatlas[anthropic,openai]",
"openai>=1.104.1",
"anthropic>=0.62.0",
"inspect-ai>=0.3.129",
"inspect-ai>=0.3.129;python_version>='3.10'",
"pytest-timeout",
"pytest>=6.2.4",
"pytest-playwright>=0.5.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/_pkg-sources.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
list(
bslib = "rstudio/bslib@main",
bslib = "rstudio/bslib@feat/toasts",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder before we merge

Suggested change
bslib = "rstudio/bslib@feat/toasts",
bslib = "rstudio/bslib@main",

shiny = "rstudio/shiny@main",
sass = "sass",
htmltools = "rstudio/htmltools@main"
Expand Down
4 changes: 3 additions & 1 deletion shiny/_docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ def __init__(
dir: str,
type: Optional[Literal["core", "express"]] = None,
) -> None:
super().__init__(type, file_names, dir)
self.type = type or os.environ.get("SHINY_MODE", "core")
self.file_names = [file_names] if isinstance(file_names, str) else file_names
self.dir = dir
Expand All @@ -250,8 +251,9 @@ def __init__(
self,
file_names: list[str] | str,
dir: str,
type: Literal["express"] = "express",
) -> None:
super().__init__(file_names, dir, "express")
super().__init__(file_names, dir, type)


def app_choose_core_or_express(
Expand Down
2 changes: 1 addition & 1 deletion shiny/_versions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
shiny_html_deps = "1.11.1.9001"
bslib = "0.9.0.9000"
bslib = "0.9.0.9002"
htmltools = "0.5.8.9000"
bootstrap = "5.3.1"
requirejs = "2.3.6"
Expand Down
Loading
Loading