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 - session-persisted tab order, touch reorder handles, and a closable Live tab demonstrate the 0.4.2 workspace controls

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. Clearing every region intentionally yields an empty queue; use Reset filters to restore all regions. Changing a layout option rebuilds the navigation while preserving the active tab, the Live tab, and values entered in its panes.
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.
- Reorder the tabs with a pointer, keyboard, or touch handle. Reload the same browser tab to confirm session storage restores their order. Close the Live tab through its close control; its server observer approves the removal.
- 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.
- Clear all regions and confirm the queue and metrics become empty. Change a layout option and confirm the active tab and pane inputs remain intact.
- Refresh the Connect app and repeat a few controls to catch asset caching or session-reconnect problems.
Versions, dependencies, and CSP
Pin the version you tested. The Git deployment manifest beside this app pins a specific glasstabs 0.4.2 GitHub commit. The app header displays its installed version. When updating package code, regenerate the manifest from the tested commit, commit it, and republish. A stale manifest can silently restore an older package version even when the app source is current.
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.
Asset loading. This app uses
glassPage(), which loads the package assets. Do not add
useGlassTabs() inside it. For a page built without
glassPage(), call useGlassTabs() once in the
UI.
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.
Run locally
library(glasstabs)
if (interactive()) {
runGlassExample("connect-workflow")
}Manifest
A deployment manifest captures the package versions in the
environment used to publish the app. Connect Cloud requires
manifest.json or renv.lock beside
app.R when publishing from GitHub. This repository tracks
the app’s manifest for that deployment, while .Rbuildignore
excludes it from the CRAN source package. Install the tested GitHub
commit before regenerating it:
rsconnect::writeManifest(appDir = "inst/examples/connect-workflow")Check that packages.glasstabs.description.Version is
0.4.2 and
packages.glasstabs.description.RemoteSha is the intended
commit before committing. Do not regenerate from a local package install
without GitHub remote metadata: that loses the reproducible GitHub
source.
Deploy to Posit Connect
The example is a self-contained Shiny app folder. A GitHub sourced Connect Cloud deployment uses the tracked manifest. Push the app and manifest, then republish the existing content from its Connect Cloud page. For a direct deployment from a package checkout, use:
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.
Workspace release checks
Test browser storage on the deployed application path, including blocked storage, reloads and separate user/project keys. Browser storage is not account storage. Approve tab closure on the server. Verify dynamically appended HTML dependencies, empty workspace recovery, modal focus, mobile keyboard positioning and touch reordering on physical devices before deploying a new release. Re-publish the actual candidate and refresh browser assets after package updates.