runGlassExample("connect-workflow") opens a Shiny page
designed to be published to Posit Connect. It demonstrates a practical
review workflow:
glassSelect() and
glassMultiSelect()glassTabsUI(orientation = "vertical", indicator = "solid")
guides users through intake, exploration, and approvalupdateGlassTabBadge() keeps tab badges aligned with the
filtered dataupdateGlassTabsUI() moves reviewers to the next stage
from server actionstheme = "auto" follows Bootstrap 5 / bslib light and
dark modesoverflow = "scroll", "multiline", and the
horizontal-only "menu" mode can be compared without leaving
the appglassPage() wrapper can be exercised in one
published sessionThe page includes an open test checklist. It is there to make a review session easy to repeat, not to turn the example into a wall of instructions.
Pin the version you tested. Install the CRAN release
for stability, or a GitHub commit for development — but record which one
the deployment uses, because the development version moves. The
installed version is visible from R with
packageVersion("glasstabs") and in the app with
glasstabs_news(); if a deployed app behaves differently
from local, the version is the first thing to compare.
Confirm the assets published. After the first
deploy, open the app and confirm the dropdowns render styled. Unstyled
controls after publishing mean the HTML dependencies did not travel with
the app: check that useGlassTabs() is called once at the UI
root (or that the app uses glassPage(), which loads the
dependency automatically), and check the manifest includes the package’s
dependencies. The “What to test” list above catches this on the first
pass, but only if someone actually opens a dropdown.
The useGlassTabs() exception, stated
once. The getting-started rule is “exactly one
useGlassTabs() call.” glassPage() is the
exception: it loads the dependency itself, so an app built on
glassPage() must not also call useGlassTabs().
One or the other, never both, never neither.
Content Security Policy. If the deployment serves a
strict CSP, set the glasstabs.csp_nonce option to the
page’s nonce and the package’s generated <style>
elements will carry it. That covers style elements only: it is not a
general strict-CSP guarantee, and scripts, inline handlers, and other
sources need their own testing under the deployment’s actual policy
before claiming compatibility.
Theming check. Before shipping a themed deployment,
run the theme-switcher example
(runGlassExample("theme-switcher")): one switch flips every
select between dark and light, including long labels, wide text in a
narrow phone frame, and a bottom-of-page dropdown that must flip above
the field. If those survive, the deployment’s theme wiring is sound.
The repository copy keeps a deployment manifest.json
generated by rsconnect::writeManifest(). It is left out of
the CRAN source package so an old package lock cannot override the
version a user has installed. When testing a repository build that is
newer than the CRAN release, install that build before regenerating the
manifest so Connect restores the same code:
The example is a self-contained Shiny app folder. In a package checkout, regenerate its manifest after installing the version you want to deploy:
rsconnect::writeManifest(appDir = "inst/examples/connect-workflow")
rsconnect::deployApp(
appDir = "inst/examples/connect-workflow",
appName = "glasstabs-connect-workflow",
appTitle = "glasstabs Connect Workflow"
)If you are deploying from an installed package, copy the example folder first:
example_dir <- system.file("examples", "connect-workflow", package = "glasstabs")
file.copy(example_dir, "connect-workflow", recursive = TRUE)
rsconnect::writeManifest(appDir = "connect-workflow")
rsconnect::deployApp(
appDir = "connect-workflow",
appName = "glasstabs-connect-workflow",
appTitle = "glasstabs Connect Workflow"
)The page uses a common Connect pattern: make the first screen the actual work surface, keep controls near the content they affect, and expose state through badges and compact metrics. That makes the app useful as a scheduled report, review queue, or operational handoff page without adding a separate landing screen.