Skip to content

fix: don't register full_screen Shiny input for non-full-screen cards#1321

Draft
elnelson575 wants to merge 2 commits into
mainfrom
fix/invalid-fullscreen
Draft

fix: don't register full_screen Shiny input for non-full-screen cards#1321
elnelson575 wants to merge 2 commits into
mainfrom
fix/invalid-fullscreen

Conversation

@elnelson575
Copy link
Copy Markdown
Contributor

Fixes #1305.

card(id = "my_card") was registering input$my_card_full_screen even when full_screen = FALSE (the default), because bslib-card-input was added to any card with an id. This caused unexpected inputs to appear in bookmarking workflows.

Root cause: is_shiny_input <- !is.null(id) — the class was gated only on whether id was provided, not on whether the card actually has full-screen capability.

Fix: is_shiny_input <- !is.null(id) && full_screen. Since bslib-card-input's sole purpose is to trigger _full_screen Shiny input registration in JS, it should only be applied when the card can actually go full screen.

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.

input$my_card_full_screen should not exist for cards that don't have full_screen=TRUE

1 participant