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

boxPlus() clashes with enable_preloader #51

Closed
leungi opened this issue Jul 27, 2019 · 3 comments
Closed

boxPlus() clashes with enable_preloader #51

leungi opened this issue Jul 27, 2019 · 3 comments

Comments

@leungi
Copy link

leungi commented Jul 27, 2019

Reproducible code below.

Expected: regardless of value of sidebar_start_open argument in boxPlus(), nothing shows up on loading screen when enable_preloader = TRUE.

Outcome: sidebar_start_open must be FALSE when enable_preloader = TRUE to get above expected result.

## example with boxPlus sidebar showing up on load
library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(leaflet)

map <- leaflet() %>% addTiles()

shinyApp(
  ui = dashboardPagePlus(
    enable_preloader = TRUE,
    dashboardHeaderPlus(),
    dashboardSidebar(),
    dashboardBody(
      setShadow("box"),
      fluidRow(
        boxPlus(
          title = "Closable Box with dropdown", 
          closable = TRUE, 
          status = "warning", 
          solidHeader = FALSE, 
          collapsible = TRUE,
          enable_sidebar = TRUE,
          sidebar_width = 25,
          sidebar_start_open = TRUE,
          sidebar_content = tagList(
            checkboxInput("somevalue", "Some value", FALSE),
            verbatimTextOutput("value")
          ),
          map
        )
      )
    )
  ),
  server = function(input, output) {
    output$value <- renderText({ input$somevalue })
  }
)
## example with boxPlus sidebar hidden on load
library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(leaflet)

map <- leaflet() %>% addTiles()

shinyApp(
  ui = dashboardPagePlus(
    enable_preloader = TRUE,
    dashboardHeaderPlus(),
    dashboardSidebar(),
    dashboardBody(
      setShadow("box"),
      fluidRow(
        boxPlus(
          title = "Closable Box with dropdown", 
          closable = TRUE, 
          status = "warning", 
          solidHeader = FALSE, 
          collapsible = TRUE,
          enable_sidebar = TRUE,
          sidebar_width = 25,
          sidebar_start_open = FALSE,
          sidebar_content = tagList(
            checkboxInput("somevalue", "Some value", FALSE),
            verbatimTextOutput("value")
          ),
          map
        )
      )
    )
  ),
  server = function(input, output) {
    output$value <- renderText({ input$somevalue })
  }
)
@DivadNojnarg
Copy link
Member

Do you still have the issue. I don't manage to reproduce it

@leungi
Copy link
Author

leungi commented Oct 6, 2019

Attached is screencast showing the behaviour when sidebar_start_open = TRUE - the box shows up while loader splash screen is active on app start up.

dashboardPlus_issue

@leungi
Copy link
Author

leungi commented Oct 7, 2019

Thanks for the update 🙏

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

2 participants