--- title: "Publishing a glasstabs Workflow to Posit Connect" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{Publishing a glasstabs Workflow to Posit Connect} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r setup, include=FALSE} knitr::opts_chunk$set(eval = FALSE) ``` ## Overview `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()` and `glassMultiSelect()` - `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 1. Resize the page and compare the three overflow choices. The page itself should never scroll sideways. 2. On a touch screen, swipe over open panel space. Text inputs, buttons, tables, and the sideways scroll box should keep their own gestures. 3. Move through the tab bar with arrow keys, Home, and End. Only the active tab should be in the normal Tab-key order. 4. Open both glass selects and try arrow keys, Home, End, Enter, Space, and Escape. 5. Add and remove the live tab. In horizontal compact-menu mode, confirm that its option appears and disappears too. 6. Hide and show Approve, then disable and enable Explore. A hidden or disabled tab should not trap selection or keyboard focus. 7. Update the Test lab badge. Its pulse should be subtle and should not move focus. 8. Compare light and dark mode with each indicator, shape, alignment, and orientation. 9. Enable reduced motion or high contrast in the operating system and reload the app. Content should change immediately and remain easy to distinguish. 10. 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.** 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 `