feat: add dom createElement adapter with fragment support.#84
Merged
knightedcodemonkey merged 2 commits intomainfrom Mar 16, 2026
Merged
feat: add dom createElement adapter with fragment support.#84knightedcodemonkey merged 2 commits intomainfrom
knightedcodemonkey merged 2 commits intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #84 +/- ##
==========================================
+ Coverage 88.12% 88.44% +0.32%
==========================================
Files 24 25 +1
Lines 1861 1913 +52
Branches 502 516 +14
==========================================
+ Hits 1640 1692 +52
Misses 70 70
Partials 151 151 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a jsx.createElement / jsx.Fragment facade so consumers can build DOM output without using the tagged-template syntax, and extends the demo + tests to validate the new API.
Changes:
- Introduces
jsx.createElementandjsx.Fragmentby wiring a new DOMcreateElementimplementation intosrc/jsx.ts. - Extracts shared JSX render types (
JsxRenderable,JsxComponent) intosrc/internal/jsx-types.ts. - Updates unit/e2e fixtures and Playwright coverage to exercise
createElement+Fragment, and adds a helper script to serve the demo fixture.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/jsx.test.ts | Adds unit tests for jsx.createElement and jsx.Fragment. |
| test/fixtures/e2e.html | Adds a new demo section rendered via jsx.createElement/Fragment. |
| src/jsx.ts | Exposes createElement + Fragment on the exported jsx tag and refactors type exports. |
| src/internal/jsx-types.ts | New shared type module for JsxRenderable / JsxComponent. |
| src/internal/dom-create-element.ts | New implementation of the DOM createElement facade and Fragment handling. |
| playwright/esm-demo.spec.ts | Adds Playwright coverage for the new demo section and de-ambiguates the original counter button selector. |
| package.json | Bumps version and adds demo:e2e-fixture script. |
| package-lock.json | Lockfile version bump alignment with package version. |
💡 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.
No description provided.