feat: typography workspace selection.#141
Merged
knightedcodemonkey merged 4 commits intomainfrom May 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
fontCssUrlin 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.