so this is going to be a long post, we'll see where it goes
i've been building Shiny apps for a couple years using shinydashboardPlus. i've been really happy with the widgets and layouts available, but recently i was exposed to bslib and given the impression that down the road, there'll be much more capability and new features here. i'm excited to make the switch, and began exploring different options with bslib with a mind towards building something similar to what i usually do in shinydashboardPlus.
the link below is to a Posit Cloud space where my different attempts reside...
i'm taking this opportunity to organize my code better than i used to, and so i've refactored out into separate files different visualizations. similarly, while i'm exploring different app UI options, i've refactored out different UI's into separate files. the app.R file allows you to explore the different UI options by just commenting out all but the one you want to see. the options available are:
- ui_dashboardPlus.R - the UI example i aspire to mimic with bslib, which uses shinydashboardPlus
- ui_pageSidebar.R - exploring bslib's page_sidebar()
- ui_pageNavbar.R - exploring bslib's page_navbar()
- ui_pageFillable.R - exploring bslib's page_fillable()
- ui_gridPage.R - exploring gridlayout's grid_page()
the contents of the app are just notational... arbitrary data and visualizations and just a collection of inputs to see how they look under different themes... they don't control anything in the app. i'm still trying to settle on which of the bslib options i like the best, and finally to the crux of my post, here's some questions i'm having about my experience so far.
using bootswatches - i like the pulse bootswatch for the purple and the availability of light and dark modes (Bootswatch: Pulse). i'm not smart on CSS and styling, but the bootswatches looked like an easy way to add some consistent coloring across an app. however, so far i've been somewhat underwhelmed by the injection of color, maybe i'm doing something wrong? exploring any of the UI options, I really expected to see a lot more purple to emphasize buttons or title blocks and card headers. am i just assuming a bootswatch is going to do more than it's intended to do?
related... i was exposed to input_dark_mode(), is this not available yet in bslib?
right sidebars - shinydashboardPlus allowed both a left and right sidebar (controlbar), and i've been a big fan. i use the right sidebar as a reference that you can pull up and then quickly hide as needed, and i like how it has the "overlay" behavior so it doesn't rejigger or squish your main app contents when it's pulled up. i've found ways to achieve both left and right sidebars with bslib by nesting layouts, but i'm not as thrilled with the look and feel as before with shinydashboardPlus. mainly i haven't figured out how to effect the overly behavior, but i'm also finding the nubs that you click to pull out and collapse the sidebar to be very muted and easy to not see. shinydashboardPlus lets you use icons for the controlbar and featured them more prominently in the app layout.
gaps and padding - somewhat with page_fillable() and especially with grid_page(), specifying these parameters is a struggle. when i'm nesting layouts to achieve sidebars on both sides, i often want to eliminate gaps and padding among widgets and containers, and it seems like these parameters are inconsistently present across various widgets, containers, and layouts (probably for good reason), and sometimes when present they don't seem to have an effect when set... something i need to learn more about.
anyways, hopefully the workspace i shared above is accessible. again the main feedback i'm hoping for is how to best get a right sidebar and to have it behave similar to shinydashboardPlus's controlbar, and how to get more impact out of using bootswatches, especially without micromanaging the CSS classes of all the widgets... again the bootswatch reference page led me to expect more just by default, so i'm wondering if this feature isn't fully executed yet?
thanks for reading and for any ideas!