-
Notifications
You must be signed in to change notification settings - Fork 16
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
Left Margin Issue with shinybusy::add_busy_bar()
Display
#34
Comments
Hello, Thanks for reporting the issue and for the information about your app and session. library(shiny)
library(shinybusy)
ui <- bslib::page_fillable(
padding = 0,
# Use this function somewhere in UI
add_busy_bar(color = "#FF0000"),
headerPanel('Iris k-means clustering'),
tags$br(),
actionButton("quick", "Quick calculation (nothing happens)"),
actionButton("sleep", "Long calculation (progress bar on top)")
)
server <- function(input, output, session) {
observeEvent(input$quick, {
Sys.sleep(0.1)
})
observeEvent(input$sleep, {
Sys.sleep(5)
})
}
shinyApp(ui, server)
But obviously you lose padding and you will have to manually add an inner container to get padding back... Victor |
Also note, that in recent version of Shiny, there's a similar functionnality : library(bslib)
library(shiny)
ui <- page_fillable(
useBusyIndicators(spinners = FALSE, pulse = TRUE),
busyIndicatorOptions(pulse_height = "20px"),
card(
card_header(
"A plot",
input_task_button("simulate", "Simulate"),
class = "d-flex justify-content-between align-items-center"
),
plotOutput("p"),
)
)
server <- function(input, output) {
output$p <- renderPlot({
input$simulate
Sys.sleep(4)
plot(x = rnorm(100), y = rnorm(100))
})
}
shinyApp(ui, server)
|
Hi, Thank you for pointing that out! Removing the padding in I wasn't aware of I appreciate your feedback and insights. :) Screencast.from.2025-01-10.17-38-55.webm |
Hi there, 👋
Thank you for creating such a great package!
I’ve encountered an issue with the
shinybusy::add_busy_bar()
function. While it works as expected in most cases, I noticed an unintended behavior: the bar has a margin on the left side that doesn’t appear to be a design choice.Here’s a screenshot for reference:
You can reproduce this issue using the following repository and Shiny app:
Repository: https://github.com/danielvartan/cran-logs
Shiny App: https://danielvartan.shinyapps.io/cran-logs/?package=shinybusy
Below are my system details for your reference.
I hope this information helps in diagnosing the issue. Please let me know if you need any additional details.
Best regards!
Created on 2025-01-02 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: