Publishing a glasstabs Workflow to Posit Connect
Source:vignettes/posit-connect.Rmd
posit-connect.RmdOverview
runGlassExample("connect-workflow") opens a Shiny page
designed to be published to Posit Connect. It demonstrates a practical
review workflow:
- filters define the active queue with
glassSelect()andglassMultiSelect() -
glassTabsUI(orientation = "vertical", indicator = "solid")guides users through intake, exploration, and approval -
updateGlassTabBadge()keeps tab badges aligned with the filtered data -
updateGlassTabsUI()moves reviewers to the next stage from server actions -
theme = "auto"follows Bootstrap 5 / bslib light and dark modes -
overflow = "scroll","multiline", and the horizontal-only"menu"mode can be compared without leaving the app - opt-in swipes, dynamic tab controls, keyboard behavior, and the
experimental
glassPage()wrapper can be exercised in one published session
The 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.
What to test after publishing
- Resize the page and compare the three overflow choices. The page itself should never scroll sideways.
- On a touch screen, swipe over open panel space. Text inputs, buttons, tables, and the sideways scroll box should keep their own gestures.
- Move through the tab bar with arrow keys, Home, and End. Only the active tab should be in the normal Tab-key order.
- Open both glass selects and try arrow keys, Home, End, Enter, Space, and Escape.
- Add and remove the live tab. In horizontal compact-menu mode, confirm that its option appears and disappears too.
- Hide and show Approve, then disable and enable Explore. A hidden or disabled tab should not trap selection or keyboard focus.
- Update the Test lab badge. Its pulse should be subtle and should not move focus.
- Compare light and dark mode with each indicator, shape, alignment, and orientation.
- Enable reduced motion or high contrast in the operating system and reload the app. Content should change immediately and remain easy to distinguish.
- Refresh the Connect app and repeat a few controls to catch asset caching or session-reconnect problems.
Run locally
library(glasstabs)
if (interactive()) {
runGlassExample("connect-workflow")
}Manifest
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:
pak::pak("PrigasG/glasstabs")
rsconnect::writeManifest(appDir = "inst/examples/connect-workflow")Deploy to Posit Connect
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"
)Workflow pattern
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.