Skip to content

27: examples/demo playground and theme-aware editor - #28

Merged
web7devs merged 3 commits into
mainfrom
27-demo-workspace
May 15, 2026
Merged

27: examples/demo playground and theme-aware editor#28
web7devs merged 3 commits into
mainfrom
27-demo-workspace

Conversation

@evgheni7

@evgheni7 evgheni7 commented May 15, 2026

Copy link
Copy Markdown
Contributor

Closes #27.

Summary

  • New examples/demo Vite workspace mounting ComposerEditor against a stub adapter with editable sample Crossplane files (XRD + Composition + crossplane.yaml + layout).
  • Repo switched from Yarn PnP to nodeLinker: node-modules so the demo can be a real Yarn workspace and Vite resolves packages natively.
  • Editor canvas no longer hard-coded to colorMode="dark" — follows the dark class on <html> via a small MutationObserver.
  • Light-mode defaults for --bg-color / --text-color in editor.css so node .inner is filled (was transparent in light mode, gradient pseudo-element bled through).
  • Softened toolbar bottom border and sidebar side border to border-border/60 to reduce contrast.
  • Demo's adapter parses crossplane.yaml dependsOn and surfaces providers to the sidebar.
  • Vite dev-server middleware at /api/blocktypes?url=… runs the library's fetchBlockTypes (Node-only OCI client) server-side; demo adapter calls it via fetch. Real CRDs from xpkg.upbound.io now show up for provider-nop and provider-family-gcp. The Crossplane core block types are served synchronously without the proxy.

Test plan

  • yarn install at repo root
  • yarn demo → confirm dev server boots and demo loads
  • Sidebar shows three providers; Crossplane shows Composition; nop and gcp show real blocks fetched from the registry
  • Toggle Light / Dark mode in the header — canvas and chrome switch consistently
  • Edit examples/demo/src/samples/*.yaml — changes hot-reload in the editor
  • yarn demo:build succeeds (production build doesn't depend on the dev middleware)

@evgheni7
evgheni7 requested a review from a team May 15, 2026 20:28
@web7devs
web7devs merged commit c543f01 into main May 15, 2026
1 check passed
@web7devs
web7devs deleted the 27-demo-workspace branch May 15, 2026 20:30
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.

Add examples/demo app and theme-aware editor canvas

2 participants