bs4Dash
bs4Dash copied to clipboard
`bs4DashBrand` visual bug when using fixed navbar and disabled sidebar
I'm a huge fan of this package and typically default to this framework when designing applications.
I ran into a display issue, described below.
Details of Issue
To reproduce:
- Use
bs4DashNavbar(fixed = TRUE, ...)
- Use
bs4DashSidebar(disable = TRUE)
Observed:
The bs4DashBrand
component visually overlaps components in the navbar.
Reprex
library(shiny)
library(bs4Dash)
header <- bs4DashNavbar(
title = bs4DashBrand(
title = "Application Title",
image = "https://picsum.photos/40/40",
),
fixed = TRUE,
leftUi = dropdownMenu(
type = "notifications",
notificationItem(
text = "test"
)
)
)
# WITH SIDEBAR - THIS WORKS AS INTENDED
shinyApp(
ui = bs4DashPage(
header = header,
sidebar = bs4DashSidebar(
bs4SidebarMenu(
bs4SidebarMenuItem("Tab 1"),
bs4SidebarMenuItem("Tab 2")
)
),
body = bs4DashBody()
),
server = function(input, output, session) {},
options = list(launch.browser = TRUE)
)
# DISABLED SIDEBAR - BRAND COMPONENT VISUAL BUG
shinyApp(
ui = bs4DashPage(
header = header,
sidebar = bs4DashSidebar(disable = TRUE),
body = bs4DashBody()
),
server = function(input, output, session) {},
options = list(launch.browser = TRUE)
)
Screenshot of visual issue:
Session info:
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices datasets utils methods base
other attached packages:
[1] bs4Dash_2.1.0 shiny_1.7.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 digest_0.6.29 later_1.3.0 mime_0.12 R6_2.5.1 xtable_1.8-4
[7] lifecycle_1.0.2 jsonlite_1.8.0 magrittr_2.0.3 cachem_1.0.6 rlang_1.0.5 cli_3.4.0
[13] renv_0.15.5 fontawesome_0.3.0 rstudioapi_0.14 promises_1.2.0.1 jquerylib_0.1.4 bslib_0.4.0
[19] ellipsis_0.3.2 tools_4.1.2 httpuv_1.6.6 fastmap_1.1.0 compiler_4.1.2 memoise_2.0.1
[25] htmltools_0.5.3 sass_0.4.2