rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
892 stars 300 forks source link

Help Menu in the Shiny Dashboard Header #218

Closed jeganathan-velu closed 7 years ago

jeganathan-velu commented 7 years ago

Hi,

Thanks for the great work. We are using shiny dashboard framework for org level BI portal.

Will it be possible to add " Help Menu" type in the Shiny dashboard header options ? some thing similar to notification menu type or message menu type under dropdownMenu().

This will help us to link to HTML page indexes for dashboard related guide and help files.

bborgesr commented 7 years ago

Can you elaborate on what functionality you need that is not already in this package?

I.e. dropdownMenu is flexible enough that you can use it for just about anything. For example, is there anything lacking in the following example?:

library(shiny)
library(shinydashboard)
library(DT)

shinyApp(
  ui = dashboardPage(
    dashboardHeader(
      dropdownMenu(
        type = "notifications", 
        icon = icon("question-circle"),
        badgeStatus = NULL,
        headerText = "See also:",

        notificationItem("shiny", icon = icon("file"),
          href = "http://shiny.rstudio.com/"),
        notificationItem("shinydashboard", icon = icon("file"),
          href = "https://rstudio.github.io/shinydashboard/")
      )
    ), 
    dashboardSidebar(), 
    dashboardBody()
  ),
  server = function(input, output, session) {}
)
jeganathan-velu commented 7 years ago

Thanks for the response. The response was very helpful. I am yet to gain proficiency in shiny framework and hence was under the wrong impression that notification menus are limited to usage descriptions provided here : https://rstudio.github.io/shinydashboard/structure.html#notification-menus

bborgesr commented 7 years ago

No worries, glad this solves your use case!

kovla commented 6 years ago

I wonder if it should be possible to include Shiny widgets (e.g., selectInput) in the header. In my own case, the user wants a single set of data filters, which would be propagated to all dashboard pages. These filters should be visible from any page, too. One could use the siderbar for that, of course, but in this case, the sidebar would be used to navigate between pages.

debanjanabanerjee commented 6 years ago

Can someone please let me know if we can include a downloadbutton inside the header in shiny?

oganm commented 4 years ago

@debanjanabanerjee this is a few years late but I found a workaround and no discussion anywhere else on the topic. You can add any widget within a header by cheating a little and doing something like

dashboardHeader(
    tags$li(actionButton('whatever','whatever'),
            class= 'dropdown'))

to trick dashboardHeader's checks and add any widget you want into the header.

I am unsure why it was designed to refuse any non-dashboard-sanctioned-dropdown-element by default though. It seems long items break the header's looks at the intersection point with the sidebar so any added item should have a limited height (50px by default).