Skip to content

Waitress message function not working correctly  #154

@jlhelling

Description

@jlhelling

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions