Skip to content

feat: typography workspace selection.#141

Merged
knightedcodemonkey merged 4 commits intomainfrom
bananas
May 8, 2026
Merged

feat: typography workspace selection.#141
knightedcodemonkey merged 4 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

@knightedcodemonkey knightedcodemonkey commented May 8, 2026

Copilot AI review requested due to automatic review settings May 8, 2026 02:42
Copy link
Copy Markdown
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

Adds per-workspace preview typography configuration by letting users provide a font CSS URL, persisting it in workspace records, and applying it inside the preview iframe runtime.

Changes:

  • Add a “Font CSS URL” control to the Workspaces drawer UI and wire it into workspace workflows.
  • Persist fontCssUrl in workspace snapshots/storage (including a backfill for existing records).
  • Apply font CSS import + font-family to the preview iframe and add Playwright coverage for persistence.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/styles/ai-controls.css Layout styles for the new font URL row in the Workspaces drawer.
src/modules/workspace/workspaces-drawer/drawer.js Adds input/button wiring for loading a font CSS URL from the drawer.
src/modules/workspace/workspace-storage.js Stores fontCssUrl, normalizes it, and attempts to backfill existing IDB records.
src/modules/preview/render-runtime.js Passes font config into iframe render and supports live font updates.
src/modules/preview/preview-font.js New controller for normalizing/storing font CSS URL and deriving font-family.
src/modules/preview-runtime/iframe-preview-executor.js Imports font CSS in base styles and applies --preview-font-family in the iframe.
src/modules/app-core/workspace-sync-controller.js Includes fontCssUrl in workspace snapshots.
src/modules/app-core/workspace-controllers-setup.js Plumbs font normalization/get/set through workspace controller setup.
src/modules/app-core/workspace-context-controller.js Applies stored workspace font URL into the preview font controller when switching workspaces.
src/modules/app-core/github-workflows.js Wires drawer “Load” action to apply/persist the font URL; flushes saves before opening workspaces.
src/modules/app-core/github-workflows-setup.js Exposes applyWorkspaceFontCssUrl to workflows.
src/modules/app-core/app-composition-options.js Passes preview font getters into runtime composition options.
src/modules/app-core/app-bindings-startup.js Initializes the preview font input during startup.
src/index.html Adds the new “Font CSS URL” input and Load button to the Workspaces drawer markup.
src/app.js Instantiates previewFont, plumbs it into render/runtime/workspace flows, and exposes applyWorkspaceFontCssUrl.
playwright/rendering-modes/core.spec.ts Verifies font config applies in preview and persists across reload/workspace storage.

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

Comment thread src/modules/workspace/workspace-storage.js Outdated
Comment thread src/modules/workspace/workspace-storage.js Outdated
Comment thread src/modules/preview/preview-font.js Outdated
Comment thread src/index.html Outdated
Comment thread src/app.js Outdated
Copilot AI review requested due to automatic review settings May 8, 2026 04:05
Copy link
Copy Markdown
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

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

Comment thread src/modules/workspace/workspace-storage.js Outdated
Comment thread src/modules/workspace/workspace-storage.js Outdated
Comment thread src/modules/preview/preview-font.js Outdated
Comment thread src/index.html Outdated
Comment thread src/modules/preview-runtime/iframe-preview-executor.js Outdated
Comment thread playwright/rendering-modes/core.spec.ts
@knightedcodemonkey knightedcodemonkey merged commit 8278579 into main May 8, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 8, 2026 15:34
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.

Phase 2(A) Typography selection per workspace

2 participants