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

Waitress message function not working correctly #154

Open
jlhelling opened this issue Oct 11, 2024 · 0 comments
Open

Waitress message function not working correctly #154

jlhelling opened this issue Oct 11, 2024 · 0 comments

Comments

@jlhelling
Copy link

Hi,
the message function to display a customized text seems not to work properly with the actual version from CRAN when it is applied to the whole app. No message is shown and the percentage count persists. Here you can find a reproducible example:

library(shiny)
library(waiter)

ui <- fluidPage(

  useWaitress(color = "#366EC0"), 

    titlePanel("Old Faithful Geyser Data"),

    sidebarLayout(
        sidebarPanel(
            sliderInput("bins",
                        "Number of bins:",
                        min = 1,
                        max = 50,
                        value = 30)
        ),

        mainPanel(
           plotOutput("distPlot")
        )
    )
)
server <- function(input, output) {

  waitress <- Waitress$
    new(theme = "overlay-percent")

  waitress$start(h3("Loading app...")) 

    output$distPlot <- renderPlot({
        x    <- faithful[, 2]
        bins <- seq(min(x), max(x), length.out = input$bins + 1)

        hist(x, breaks = bins, col = 'darkgray', border = 'white',
             xlab = 'Waiting time to next eruption (in mins)',
             main = 'Histogram of waiting times')
    })
    waitress$inc(10)  # Increment progress
    Sys.sleep(.8)

    waitress$close()
}

shinyApp(ui = ui, server = server)
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

No branches or pull requests

1 participant