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

shinydashboardPlus::boxSidebar : function arguments. #169

Open
svenb78 opened this issue Sep 7, 2022 · 1 comment
Open

shinydashboardPlus::boxSidebar : function arguments. #169

svenb78 opened this issue Sep 7, 2022 · 1 comment

Comments

@svenb78
Copy link

svenb78 commented Sep 7, 2022

Hello,

concerning the arguments of the boxSidebar function, there might be an issue.

The function looks like that:

function (..., id = NULL, width = 50, background = "#333a40", 
    startOpen = FALSE, icon = shiny::icon("cogs")) 
{
    stopifnot(width >= 25 && width <= 100)
    toolbarTag <- shiny::tags$button(id = id, `data-background` = background, 
        `data-width` = width, `data-widget` = "chat-pane-toggle", 
        `data-toggle` = "tooltip", `data-original-title` = "More", 
        `data-start-open` = tolower(startOpen), type = "button", 
        icon)
    contentTag <- shiny::tags$div(style = "z-index: 1; height: inherit;", 
        class = "direct-chat-contacts", shiny::tags$ul(class = "contacts-list", 
            shiny::tags$li(...)))
    shiny::tagList(toolbarTag, contentTag)
}

I think, it is the contentTag that refers to the sidebar box element (-> opened box). So, why does the function's width argument refer to the toolbarTag?

In fact, in a simple app, I had no problems using boxSidebar. In the context of a more complex app based on golem, the width of the opened sidebar box was always 100%, no matter what I used as argument. Also changing the value for the background argument did not work. So, I inspected the HTML and found, that manipulating the style tag works:

HTML

@justacec
Copy link

We also need the ability to adjust the z-index or add a class to help with custom CSS for the slide out.

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