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

Unable to scroll in input sidebar on mobile device #380

Open
adam-mdmph opened this issue Dec 29, 2021 · 7 comments
Open

Unable to scroll in input sidebar on mobile device #380

adam-mdmph opened this issue Dec 29, 2021 · 7 comments

Comments

@adam-mdmph
Copy link

Fantastic package. Thank you so much for developing this. Makes deploying dashboards super easy.

I have developed a risk calculator for vascular surgery and deployed a demo here: www.vascalc.org. However, when opened on a mobile device or narrow the window, I am unable to scroll in the input sidebar. I can't find a fix in your documentation.

Thanks again for a great package!

@RobWiederstein
Copy link

For what it's worth, I opened your app on safari in the "Enter Responsive Design Mode" and on the Iphone 8 view, it seemed to be working . . .

Interesting stuff too!

@al-obrien
Copy link

al-obrien commented Feb 28, 2022

I was able to repeat this issue @adam-mdmph reported on the latest version by having many options to select as part of the UI. Adding dateRangeInput() as one of the UI elements seemed to be the easiest way to recreate the issue.

@adam-mdmph
Copy link
Author

Thank you for making such a great package and reviewing my issue. I found that when I inserted a link at the bottom of the column, I was able to scroll to the bottom, but without the link, it cuts off after 8 items or so. Probably just a sign I should trim down my inputs... but thought I would pass along that I was having this issue.

@adam-mdmph
Copy link
Author

I revised my project to recreate the issue. You may see it if you open this page for the carotid risk scores. https://adam-johnson.shinyapps.io/vascalc-flexdashboard/#section-carotid

@al-obrien
Copy link

Not sure what other browsers were tested, but I found it was easiest to notice the issue when in Chrome (using the link in the prior post). Firefox doesn't flip to the more compact format as readily from what I can see...

@gadenbuie
Copy link
Member

I think I see the issue in the latest link. The sidebar inputs overflow the parent container but you can't scroll:

Image

Here's a solution you can use in your dashboards if you run into a similar problem. Add this CSS to your dashboard, either in a css chunk or in a separate .css file that you pass to the css parameter of flex_dashboard.

.mobile-layout .chart-wrapper .chart-stage {
  overflow-y: auto;
}

That might not be perfect and you may need to include an ID in the CSS selector, e.g. .mobile-layout #section-patient-details-1.chart-wrapper .chart-stage.

For my own notes: something about having only shiny inputs is causing flexdashboard to decide that the contents of the sidebar should flex

result.flex = forceFlex || componentsFlex(components);

@al-obrien
Copy link

al-obrien commented Mar 3, 2023

This worked okay in my first attempt, but in order to prevent some clipping at the very bottom I had to....

  1. Apply the overflow-y:auto to the chart-shim class
  2. Adjust the .chart-shim bottom position or bottom margin to 20 px

image

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

4 participants