Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

* flexdashboard now prevents top margin from being applied to boxes created with flexdashboard's markdown syntax when Bootstrap 5 is used. (#443)

* Allow using `theme.preset` without needing to set `theme.bootswatch` to `null`. (#444)

# flexdashboard 0.6.2

## New features
Expand Down
8 changes: 7 additions & 1 deletion R/bslib.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ resolve_theme <- function(theme) {
# Default to cosmo theme (just like the non-bslib usage does)
# (Users can explictly opt-out with bootswatch: default)
if (!is_bs_theme(theme)) {
theme <- utils::modifyList(list(bootswatch = "cosmo"), theme)
theme_default <- list()
# bslib 0.5.1 added the "preset" option, which flexdashboard users may provide
# However, `preset` should not be set with `bootswatch`
if (packageVersion("bslib") < "0.5.1" && !"preset" %in% names(theme)) {
theme_default$bootswatch <- "cosmo"
}
theme <- utils::modifyList(theme_default, theme)
theme <- do.call(bs_theme, theme)
}
# Also default to enable-rounded: true
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ rmarkdown::draft("dashboard.Rmd",

There are two main places to get help with flexdashboard:

- The [Posit
community](https://forum.posit.co/tag/flexdashboard)
- The [RStudio
community](https://community.rstudio.com/tags/c/R-Markdown/10/flexdashboard)
is a friendly place to ask any questions about flexdashboard. Be sure
to use the `flexdashboard` tag. Add also the `shiny` tag is you are
using a Shiny runtime.
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/_snaps/format.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
<h3>A wide plot</h3>
<div class="knitr-options" data-fig-width="960" data-fig-height="480">
</div>
<p><img src="data:image/png;base64,..." width="960" data-figure-id="fig1" /></p>
<p><img role="img" aria-label src="data:image/png;base64,..." alt width="960" data-figure-id="fig1" /></p>
</div>
<div id="a-tall-plot" class="section level3">
<h3>A tall plot</h3>
<div class="knitr-options" data-fig-width="480" data-fig-height="960">
</div>
<p><img src="data:image/png;base64,..." width="480" data-figure-id="fig2" /></p>
<p><img role="img" aria-label src="data:image/png;base64,..." alt width="480" data-figure-id="fig2" /></p>

Loading