Feature/browser#70
Open
taranais wants to merge 3 commits into
Open
Conversation
- Extracted rendering logic into a new `renderMarkup.ts` module for better separation of concerns. - Introduced a `splitter.ts` module to handle layout splitting logic. - Updated `preview.ts` to utilize the new `renderMarkup` module and improve error handling. - Created comprehensive tests for the new modules, including `renderMarkup`, `splitter`, and integration tests for the playground. - Enhanced toolbar functionality and added tests to ensure proper wiring of callbacks. - Improved Monaco editor initialization and lazy loading in the preview. - Updated CSS styles for better layout handling and added overflow management. - Configured Vite for optimized chunking of dependencies, particularly for Monaco editor. - Added Vitest configuration for testing with coverage reporting.
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.
Pull Request
Description
This PR adds a new interactive
wiremdplayground (playground/) to edit markdown and preview rendered output in real time.It also includes follow-up fixes/refactors for Monaco ESM imports, split-pane resizing behavior, editor update handling, preview error reset behavior, and toast timing.
Type of Change
Related Issues
Fixes #
Related to #
Changes Made
playground/app (Vite + TypeScript + Monaco) with its own config, dependencies, and build setup.setValuesuppression/debounce), reset preview state on render errors, and fixed toast timer stacking.npm run playgroundto build core package, install playground deps, and start playground dev server.Testing
Test Coverage
npm test)Manual Testing
npm run build(root package build succeeds).npm test(471/471 tests passing).npm --prefix playground run build(playground build succeeds).npm --prefix playground run dev -- --host 127.0.0.1 --port 4174and verified the playground page is served.Examples
Input
Output
Checklist
Breaking Changes
Migration Guide
Screenshots/Recordings
Not included in this PR.
Performance Impact
Playground build includes Monaco and produces a large JS bundle (warning about chunk size). This impacts playground initial load, not the core
wiremdlibrary runtime.Documentation
Additional Notes
Playground resolves
wiremdto../src/index.tsin Vite, so playground changes validate against local source during development.Reviewer Checklist