You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Listening on http://127.0.0.1:5053
Browsing http://127.0.0.1:5053
Warning: Error in : `bslib::bs_themer()` requires `shiny::bootstrapLib()` to be present in the app's UI. Consider providing `bslib::bs_theme()` to the theme argument of the relevant page layout function (or, more generally, adding `bootstrapLib(bs_theme())` to the UI.
42: stop
41: bslib::bs_themer [/tmp/RtmpQ1Pvgh/R.INSTALL26981d69cd6522/bslib/R/bs-theme-preview.R#363]
40: server [#2]
3: runApp [/tmp/RtmpVRGFGf/R.INSTALL271ae265d30250/shiny/R/runapp.R#388]
2: print.shiny.appobj [/tmp/RtmpVRGFGf/R.INSTALL271ae265d30250/shiny/R/shinyapp.R#565]
1: <Anonymous>
Error : `bslib::bs_themer()` requires `shiny::bootstrapLib()` to be present in the app's UI. Consider providing `bslib::bs_theme()` to the theme argument of the relevant page layout function (or, more generally, adding `bootstrapLib(bs_theme())` to the UI.
The issue can be fixed by using bslib::page_fixed() instead of fixedPage(). However:
The error message is misleading
bslib appears compatible with using bslib::page_fixed() or fixedPage() interchangeably with no impact, so finding out the root of the issue is challenging
Some more tests/infos:
The bug appears with shiny::fixedPage() or shiny::fluidPage(). And can be fixed using bslib::page_fixed() or bslib::page_fluid().
The bug appears only when fixedPage() is used internally. As you can see in my example, I'm using a fluidPage in my initial call, and this one does not create the bug. It is only when used inside this function.
Using a fixedPage() inside a fluidPage() is relatively standard, typically to create a full-width header at the top of the page, and then a fixed-width container with the content of the page. Despite the misleading function naming, they don't create a page but a container, and we can have containers inside containers.
Session Info
> sessionInfo()
R version 4.3.3 (2024-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 12 (bookworm)
Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.21.so; LAPACK version 3.11.0
Using a fixedPage() inside a fluidPage() is relatively standard, typically to create a full-width header at the top of the page, and then a fixed-width container with the content of the page.
I upgraded to the latest version of bslib and can confirm that the problem persists.
Describe the problem
Using
bslib::bs_themer()
fails when the UI usesfixedPage()
in its code.Here is a minimal reproducible example:
And the error message:
The issue can be fixed by using
bslib::page_fixed()
instead offixedPage()
. However:bslib
appears compatible with usingbslib::page_fixed()
orfixedPage()
interchangeably with no impact, so finding out the root of the issue is challengingSome more tests/infos:
shiny::fixedPage()
orshiny::fluidPage()
. And can be fixed usingbslib::page_fixed()
orbslib::page_fluid()
.fixedPage()
is used internally. As you can see in my example, I'm using afluidPage
in my initial call, and this one does not create the bug. It is only when used inside this function.fixedPage()
inside afluidPage()
is relatively standard, typically to create a full-width header at the top of the page, and then a fixed-width container with the content of the page. Despite the misleading function naming, they don't create a page but a container, and we can have containers inside containers.Session Info
The text was updated successfully, but these errors were encountered: