rstudio / rstudio/flexdashboard
renderText scrollbar even with css command won't work inside column
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 848
- Forks
- 298
- PR merge metrics
- No merged PRs in 30d
Description
For me to currently add a scrollbar to renderText (using renderUI), I have to do the following gymnastics:
---
title: "my title"
runtime: shiny
output:
flexdashboard::flex_dashboard:
orientation: rows
theme: cerulean
source_code: embed
---
```{r global, include=FALSE}
library(tidyverse)
# more code here
```
# Sidebar {.sidebar data-width=150}
```{r}
# stuff on sidebar
```
# Page {.hidden}
## Text
```{r}
scroll_css <- "<style> #section-text {overflow-y: scroll;} </style>"
renderUI({
to_print <- str_c(scroll_css, some_line, "<br>", some_other_line)
htmltools::HTML(to_print)
})
```
However, if instead of ## Text above I did
## Column
### Text
```{r}
scroll_css <- "<style> #section-text {overflow-y: scroll;} </style>"
renderUI({
to_print <- str_c(scroll_css, some_line, "<br>", some_other_line)
htmltools::HTML(to_print)
})
```
scroll bar (as determined by the css styling line) will no longer work
I would be grateful if (a) renderText({ ... }) would actually produce a scrollbar automatically when the text was too long, or somehow the above problem would be fixed.
Overall, using flexdashboard is appealing but the package seems to be pretty erratic, controls don't alway render, etc. So hopefully there will be enough time to push for bug fixing here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue's flexdashboard example using renderUI, the nested Column/Text layout, and the #section-text CSS rule. Compare the top-level Text case with the nested case and determine whether the scrollbar behavior can be corrected; done means the CSS-based scrollbar works inside the nested column without the extra workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, r
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100