Skip to content

refactor: modules and defaults.#11

Merged
knightedcodemonkey merged 3 commits intomainfrom
bananas
Mar 17, 2026
Merged

refactor: modules and defaults.#11
knightedcodemonkey merged 3 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings March 17, 2026 15:01
Copy link
Contributor

Copilot AI left a comment

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 reorganizes the client-side playground code into a src/modules/ structure and expands runtime capabilities (CDN loading, rendering, editor, diagnostics, theme/layout, preview background), with accompanying UI and e2e test updates.

Changes:

  • Moved core runtime logic into new controllers under src/modules/ (CDN resolution, render runtime, CodeMirror editor, type diagnostics, UI controllers).
  • Updated UI styling/behavior to support an “ok” diagnostics state (checkmark indicators) and refined default samples (incl. a React-mode default).
  • Updated bootstrap/build wiring and Playwright tests to align with the new module structure and new defaults.

Reviewed changes

Copilot reviewed 8 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/styles/diagnostics.css Adds “ok” visual styling for diagnostics heading/toggle.
src/modules/type-diagnostics.js New controller to load TS from CDN and run in-browser type diagnostics.
src/modules/render-runtime.js New rendering/controller runtime (DOM/React modes, CSS compilation, module class remap).
src/modules/preview-background.js New controller to manage preview background color + color normalization.
src/modules/layout-theme.js New controller for layout + theme persistence and UI state.
src/modules/editor-codemirror.js New CodeMirror runtime loader + editor factory via CDN.
src/modules/diagnostics-ui.js Adds “ok” state handling for diagnostics toggle + heading styling.
src/modules/defaults.js New default samples (JSX/CSS + React JSX sample).
src/modules/cdn.js Consolidates CDN provider logic + adds TS lib URL generation helpers.
src/defaults.js Removes old defaults file (moved into src/modules/defaults.js).
src/bootstrap.js Updates preload wiring to import CDN helpers from src/modules/cdn.js.
src/app.js Rewires imports to modules, adds React default application on first switch, connects new controllers.
scripts/build-prepare.js Updates build-prepare wiring/messages to reference src/modules/cdn.js.
playwright/app.spec.ts Makes rendering assertions less dependent on specific sample DOM structure.

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

@knightedcodemonkey knightedcodemonkey merged commit 212028d into main Mar 17, 2026
5 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch March 17, 2026 15:09
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