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

fix(card): Report full screen state at <id>_full_screen #1032

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

gadenbuie
Copy link
Member

This PR updates how cards report their full screen state. Now, given

card(id = "my_card", full_screen = TRUE, ...)

users will need to use input$my_card_full_screen to react to the card's full screen state change.

Previously, we were providing input$my_card with essentially list(full_screen = TRUE), which we chose intending to leave room for future state or event data reporting. However, any use of input$my_card takes a reactive dependency on the entire data structure reported from the client. If we imagine that we've added another reported event type via input$my_card, changes in the new event type will cause input$my_card$full_screen to invalidate, even if the value doesn't change.

I explored a range of other options and using the <id>_full_screen pattern seems to be the most straightforward and best option at this time.

Copy link
Collaborator

@cpsievert cpsievert left a comment

Choose a reason for hiding this comment

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

Thank you!

@gadenbuie gadenbuie merged commit 5e974fd into main Mar 28, 2024
13 checks passed
@gadenbuie gadenbuie deleted the fix/card-full-screen-input branch March 28, 2024 20:38
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.

2 participants