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

run() leaks shiny's theme state #2159

Closed
cpsievert opened this issue Jun 4, 2021 · 1 comment · Fixed by #2160
Closed

run() leaks shiny's theme state #2159

cpsievert opened this issue Jun 4, 2021 · 1 comment · Fixed by #2160

Comments

@cpsievert
Copy link
Contributor

cpsievert commented Jun 4, 2021

run()-ing a runtime: shiny document with a {bslib} theme currently leaks shiny::getCurrentTheme() state. This means, you'll see behavior like:

shiny::getCurrentTheme()
#> NULL
rmarkdown::run("Untitled.Rmd")
class(shiny::getCurrentTheme())
#> [1] "bs_version_4" "bs_theme"     "sass_bundle" 

When Untitled.Rmd has something like

---
title: "Untitled"
runtime: shiny
output: 
  html_document:
    theme:
      version: 4
      bg: black
      fg: white
---

```{r}
selectInput("state", "states", state.abb)
```
@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant