Skip to content

Scope can-play composition with built-ins#246

Merged
spencerc99 merged 2 commits into
mainfrom
cx/can-play-capability-composition
Jun 30, 2026
Merged

Scope can-play composition with built-ins#246
spencerc99 merged 2 commits into
mainfrom
cx/can-play-capability-composition

Conversation

@spencerc99

@spencerc99 spencerc99 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Scope bare can-play DOM props away from built-in capabilities when an element uses both.
  • Add regression coverage for can-play + can-move composition.
  • Document the supported composition behavior and add a patch changeset.
  • Fix TypeScript nullability around SyncedStore/page-data proxy access found during package build.
  • Leave starter templates unchanged because their current examples do not demonstrate multi-tag composition and remain copy-pasteable.

Root cause

The runtime read generic DOM element props for every capability tag on a node, so can-play props like defaultData and updateElement could override a built-in initializer such as can-move.

Verification

  • ./node_modules/.bin/vitest run --no-typecheck in packages/playhtml (31 files, 284 tests passed; existing perf stdout and expected can-duplicate stderr)
  • bun run build in packages/playhtml (passed with existing Sass legacy API warning)
  • /Users/spencerchang/Projects/playhtml/node_modules/.bin/astro build in apps/docs (passed with existing Vite/Astro warnings)
  • git diff --check

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

bun add https://pkg.pr.new/@playhtml/common@246
bun add https://pkg.pr.new/playhtml@246
bun add https://pkg.pr.new/@playhtml/react@246

commit: 2b9149a

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deploying playhtml with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2b9149a
Status: ✅  Deploy successful!
Preview URL: https://08660d27.playhtml.pages.dev
Branch Preview URL: https://cx-can-play-capability-compo.playhtml.pages.dev

View logs

@spencerc99 spencerc99 marked this pull request as ready for review June 30, 2026 02:19
@spencerc99

Copy link
Copy Markdown
Owner Author

Code review

No issues found. Checked for bugs and project-instruction compliance.

@spencerc99 spencerc99 merged commit a091c11 into main Jun 30, 2026
5 checks passed
@spencerc99 spencerc99 deleted the cx/can-play-capability-composition branch June 30, 2026 15:02
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