rstudio / shinydashboard

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

dashboardPage.R min-height: 611px; #283

Open Sch1urch3r opened 6 years ago

Sch1urch3r commented 6 years ago

The dashboardPage.R requires a min-height: 611px (lines 69) for unknown reasons.

Background: I run a full screen shinydashboard on a Raspberry Pi 3 with the official Raspberry Pi 7'' touchscreen display. Unfortunately, this display features a 800 x 480 display. With the required min-height of 611px given in dashboardPage.R this display will always show scroll bars. After modifying to like 411px, the scrollbars disappear. Is there a reason for the required 611px min-height? So far, I have not seen any issues with my reduced 411px min-height.

wch commented 6 years ago

The min-height was added in b91f5de54e3b1b5be7d851dea62a347997ecad31.

I don't actually recall why it's there at all. I'm reluctant to remove it or change it without testing weird edge cases, though.

If you want to customize your dashboard for display on a Raspberry Pi touchscreen, I suggest adding custom CSS to your dashboard as shown here: https://shiny.rstudio.com/articles/css.html#add-css-to-the-header-with-tags

Sch1urch3r commented 6 years ago

Thanks @wch this helped me to find a nicer and cleaner workaround. Still the requirement for a minimum display height of 611px remains unclear to me and could potentially be fixed.

In case anyone experiences the same issue, adding the following under dashboardBody does the trick: tags$head( tags$style(HTML(" body { min-height: 411px !important; } ")) ),

As I learned using the !important; tag is not considered good practise but otherwise the CSS defenition will not overwirte the style attribute given in dashboardPage.