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 url bookmarking with possibility to modify excludes #3762

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

galachad
Copy link
Contributor

This small bug fix the problem that exclude was created before onSave call. It's impacting the url bookmarking and this change made it consistent with the server bookmarking.

Minimal example:

library(shiny)

ui <- function(req) {
  fluidPage(
    sliderInput("obs", "Number of observations:",
                min = 0, max = 1000, value = 500
    ),
    textInput("text", "Label", "Data Summary"),
    plotOutput("distPlot"),
    bookmarkButton()
  )
}

# Server logic
server <- function(input, output) {
  output$distPlot <- renderPlot({
    hist(rnorm(input$obs))
  })

  onBookmark(function(state) {
    # Exclude from bookmarking
    state$exclude <- c("text")
  })
}

shinyApp(ui, server, enableBookmarking = "url")
# shinyApp(ui, server, enableBookmarking = "server")

@galachad
Copy link
Contributor Author

galachad commented Feb 2, 2023

Hi @wch, could you take a look on PR as it fixing the issue with evaluating exclusion on url bookmarking.

@CLAassistant
Copy link

CLAassistant commented Nov 8, 2023

CLA assistant check
All committers have signed the CLA.

@galachad
Copy link
Contributor Author

Hi @cpsievert could you please look at this bug, it's a small fix to make the bookmarking functionality consistence for the URL and server.

@galachad
Copy link
Contributor Author

Hi @jcheng5 could you, please look at this small bug fix. Thank you.

@cpsievert
Copy link
Collaborator

Hi @galachad, thanks for the nice PR and sorry for the long wait! Would you mind also updating the NEWS.md with an explanation of the bug fix?

@galachad
Copy link
Contributor Author

@cpsievert Added a point to NEWS.md

@cpsievert cpsievert merged commit 79af1d6 into rstudio:main Oct 28, 2024
12 checks passed
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.

3 participants