Skip to content

Adopt @screenly-labs/signage-kit for degraded mode - #15

Merged
vpetersson merged 1 commit into
masterfrom
adopt-signage-kit
Jul 13, 2026
Merged

Adopt @screenly-labs/signage-kit for degraded mode#15
vpetersson merged 1 commit into
masterfrom
adopt-signage-kit

Conversation

@vpetersson

Copy link
Copy Markdown
Contributor

Fleet-wide adoption: this Cloudflare Worker app now consumes @screenly-labs/signage-kit (github:Screenly-Labs/signage-kit#2026.7.0) instead of its inlined degraded-mode plumbing (support floor, CSS down-level recipe, JS bundler, inline gate, replaceChildren shim, html.legacy kill-switch).

Behaviour is unchanged and build output verified equivalent: kill-switch present, 0 @layer, 0 :lang(, client JS es2017. typecheck + lint + tests pass. Committed CSS source is the readable form (build minifies in place); main.js stays a gitignored artifact.

Replace the inlined degraded-mode plumbing (support floor, CSS down-level recipe,
JS bundler, inline gate, replaceChildren shim, html.legacy kill-switch) with the
shared package (github:Screenly-Labs/signage-kit#2026.7.0). Build output verified
equivalent: kill-switch present, 0 @layer, 0 :lang(), es2017.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the app’s “degraded mode” implementation (legacy/slow-device gate, CSS kill-switch, JS polyfills, and build plumbing) to the shared @screenly-labs/signage-kit, aligning this worker with the fleet-wide degraded-mode behavior while keeping the rendered output equivalent.

Changes:

  • Replace the inlined degraded-mode <script> gate with the shared GATE HTML snippet from @screenly-labs/signage-kit.
  • Swap local asset build steps (JS bundling + CSS processing) to signage-kit’s build helpers.
  • Remove app-local degraded-mode CSS kill-switch rules and the local replaceChildren polyfill file in favor of shared implementations.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/components/Layout.tsx Uses @screenly-labs/signage-kit/gate to inject the shared degraded-mode gate before the stylesheet.
build.ts Replaces in-repo JS/CSS build plumbing with signage-kit’s bundleJs and processCss helpers.
assets/static/js/main.ts Switches the first-import polyfills side effect to @screenly-labs/signage-kit/polyfills.
assets/static/js/polyfills.ts Removes the local replaceChildren shim now provided by the shared kit.
assets/static/styles/main.css Removes the app-local html.legacy kill-switch block, documenting that the shared build step prepends it.
package.json Adds @screenly-labs/signage-kit dependency (GitHub ref) and removes the top-level browserslist config field.
bun.lock Locks the newly added @screenly-labs/signage-kit dependency resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vpetersson
vpetersson merged commit f9f6ff3 into master Jul 13, 2026
2 checks passed
@vpetersson
vpetersson deleted the adopt-signage-kit branch July 13, 2026 16:15
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.

2 participants