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

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

Open
Sch1urch3r opened this issue Jul 7, 2018 · 2 comments
Open

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

Sch1urch3r opened this issue Jul 7, 2018 · 2 comments

Comments

@Sch1urch3r
Copy link

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.

Sch1urch3r added a commit to Sch1urch3r/shinydashboard that referenced this issue Jul 7, 2018
Reduce min-height for smaller displays. Resolve issue rstudio#283
@wch
Copy link
Contributor

wch commented Jul 9, 2018

The min-height was added in b91f5de.

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
Copy link
Author

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.

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