Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update types to allow navset_* functions to accept MetadataNode args #1094

Merged
merged 2 commits into from
Feb 2, 2024

Conversation

wch
Copy link
Collaborator

@wch wch commented Feb 1, 2024

I noticed that many of the navset_* functions did not accept MetadataNode arguments, but they should, in case someone wants to pass in HTMLDependency objects.

For reference, the ability to accept MetadataNode args was added to many navset_* functions in #455, but some newer navset_* components did not have this typing.

@wch wch requested a review from cpsievert February 1, 2024 15:52
@wch
Copy link
Collaborator Author

wch commented Feb 1, 2024

Now that I look at it more closely, perhaps these functions should also accept Sequence[MetadatNode], as is already done in navset_bar() on main:

py-shiny/shiny/ui/_navs.py

Lines 1152 to 1153 in aba9459

def navset_bar(
*args: NavSetArg | MetadataNode | Sequence[MetadataNode],

@wch wch merged commit 6fbcd8e into main Feb 2, 2024
49 of 50 checks passed
@wch wch deleted the navs-metadatanode branch February 2, 2024 03:19
schloerke added a commit that referenced this pull request Feb 13, 2024
* main:
  Bump version to 0.7.1.9000
  Fix input_task_button for modules (#1108)
  Bump version to 0.7.1
  Test input task button and extended task decorator (#1099)
  Add remaining examples for express API reference (#1093)
  test: Add `make playwright-debug` to help debug playwright tests (#1097)
  Make input_selectize work correctly within a module (#1091)
  Update types to allow `navset_*` functions to accept `MetadataNode` args (#1094)
  Update changelog
  Update express.ui.hold() to accept any type of object (#1089)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants