Skip to content

Commit

Permalink
tests(navsets): Add navsets kitchensink tests (#1602)
Browse files Browse the repository at this point in the history
Co-authored-by: Barret Schloerke <[email protected]>
  • Loading branch information
karangattu and schloerke authored Aug 27, 2024
1 parent 6e7c468 commit 769b36b
Show file tree
Hide file tree
Showing 13 changed files with 698 additions and 29 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* Some copies of Windows 10 have registry entries mapping .js files to content type "text/plain", which was causing all sorts of problems for browsers. (#1624)

* Added missing support for `express.ui.navset_card_pill(placement:)`. (#1602)

* Added `.expect_sidebar()` and `.expect_title()` methods for `NavsetCardTab`, `NavsetCardPill`, `NavsetCardUnderline`, and `NavsetBar`. (#1602)

* Added `.expect_placement()` method for `NavsetCardPill` and `NavsetCardUnderline`. (#1602)

### Deprecations

## [1.0.0] - 2024-07-18
Expand Down
2 changes: 1 addition & 1 deletion docs/_quartodoc-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ quartodoc:
- title: Navigation (tab) panels
desc: Methods for interacting with Shiny app UI content controller.
contents:
- playwright.controller.NavPanel
- playwright.controller.NavsetBar
- playwright.controller.NavsetCardPill
- playwright.controller.NavsetCardTab
Expand All @@ -58,6 +57,7 @@ quartodoc:
- playwright.controller.NavsetPillList
- playwright.controller.NavsetTab
- playwright.controller.NavsetUnderline
- playwright.controller.NavPanel
- title: Upload and download
desc: Methods for interacting with Shiny app uploading and downloading controller.
contents:
Expand Down
4 changes: 4 additions & 0 deletions shiny/express/ui/_cm_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ def navset_card_pill(
sidebar: Optional[ui.Sidebar] = None,
header: TagChild = None,
footer: TagChild = None,
placement: Literal["above", "below"] = "above",
) -> RecallContextManager[NavSetCard]:
"""
Context manager for a set of nav items as a tabset inside a card container.
Expand All @@ -947,6 +948,8 @@ def navset_card_pill(
UI to display above the selected content.
footer
UI to display below the selected content.
placement
Placement of the nav items relative to the content.
"""
return RecallContextManager(
ui.navset_card_pill,
Expand All @@ -957,6 +960,7 @@ def navset_card_pill(
sidebar=sidebar,
header=header,
footer=footer,
placement=placement,
),
)

Expand Down
Loading

0 comments on commit 769b36b

Please sign in to comment.