Skip to content

chore(collections): move content-collection extension into gallery#356

Open
mcgaffin wants to merge 10 commits into
mainfrom
dcm-add-content-collections
Open

chore(collections): move content-collection extension into gallery#356
mcgaffin wants to merge 10 commits into
mainfrom
dcm-add-content-collections

Conversation

@mcgaffin

@mcgaffin mcgaffin commented Jun 1, 2026

Copy link
Copy Markdown

Summary

Note

This is currently for internal use only and will not be published via the extension feed.

Moves the Content Collection Configurator into this repo as extensions/content-collections. This consolidates the configurator alongside the other Connect extensions so it can eventually ship through the Gallery.

Demo

https://dogfood.team.pct.posit.it/content-collection-extension/

Not ready for the Gallery yet

This PR adds the code and registers the extension with the CI workflow (lint/package/test on PRs), but does not list it in extensions.json and pins manifest.json to "version": "0.0.0" — which CONTRIBUTING.md reserves as a never-release sentinel. Both gates need to be cleared explicitly before any Gallery release happens; for now, deployment is manual via rsconnect::deployApp() from this directory.

What's included

  • extensions/content-collections/ — Shiny app source (app.R, R/, dashboard_template/, www/, tests/), renv.lock, and manifest.json generated via rsconnect::writeManifest() (95 R deps captured)
  • manifest.json extension block:
    • category: extension, tags: [r, shiny]
    • requiredFeatures: [API Publishing, OAuth Integrations, Current User Execution] — derived from configurator's use of rsconnect::deployApp and the Visitor API Key OAuth integration
    • minimumConnectVersion: 2025.01.0 (Visitor API Key support)
  • README.md covering setup, the Visitor API Key OAuth requirement, and how publishing works
  • New CI filter in .github/workflows/extensions.yml so the lint/package/test pipeline runs on changes to this extension

Verified

  • Manually deployed the bundle to Connect and confirmed create/edit/publish flows work end-to-end after attaching the Visitor API Key OAuth integration

Follow-ups (separate PRs)

  • Promote to the Gallery: bump version, add an entry to extensions.json

@mcgaffin mcgaffin marked this pull request as ready for review June 2, 2026 19:50
mcgaffin and others added 8 commits June 2, 2026 16:00
The 2025.01.0 value reflected when the Posit Connect API OAuth
integration type became available, but CI's integration-test matrix
floor is 2025.04.0 — so the preflight check refused the lower value.
Bumping to 2025.04.0 aligns with the matrix and the Gallery's general
minimum. README updated to note that Connect 2025.05+ ships a default
Visitor API Key integration (admin-create step skippable) while the
per-content attach step remains required on every version.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
rsconnect::writeManifest() captured the local R version (4.5.3) as
"~=4.5.0", which Connect interpreted as "R 4.5.x exactly". The test
containers don't carry 4.5, so every integration-test variant failed
with "no compatible Local environment with R version 4.5.3 (~=4.5.0)".

The strictest package-level R dependency in the manifest is
R >= 4.4.0 (MASS, Matrix, mgcv), and every other R extension in this
repo uses ~=4.4. Matching convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
stage_bundle() resolved R/render.R, R/icons.R, R/connect_api.R, and
www/icons/ relative to the Shiny session's working directory and
silently skipped missing helpers via `if (file.exists(src))`. A cwd
drift (test harness, future helper, callr re-entry) would silently
ship a corrupt bundle that errored only at deploy-time render.

- Add a source_dir parameter; resolve R/ and www/icons/ against it.
- Make missing required helpers a hard stop with a clear hint.
- Capture app_root once at app startup and pass it through.
- Drop the setwd() workaround from three tests; add tests for
  the strict-helper-missing error path and full cwd independence.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…arkdown call

Two review follow-ups:

1. visitor_api_key() now returns list(key, status, message). The home
   view shows a "Couldn't authenticate to Connect" banner when status
   is "failed", so a publisher whose Visitor API Key OAuth integration
   isn't attached sees a clear diagnostic instead of an empty list
   indistinguishable from "you own zero collections." The diagnostic
   message lives in a collapsible <details> block.

2. Replace markdown::markdownToHTML(fragment.only = TRUE) with
   commonmark::markdown_html() at the two intro-rendering sites.
   `fragment.only` is deprecated in the markdown package, and the
   deployed dashboard inherits whatever `markdown` Connect has at
   render time (not pinned by our renv.lock). commonmark is already
   in renv.lock as a transitive dep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant