Skip to content

refactor: wrap typing page in solidjs (@miodec) - #8438

Merged
Miodec merged 5 commits into
masterfrom
solid-test
Oct 4, 2026
Merged

Miodec merged 5 commits into
masterfrom
solid-test

Conversation

@Miodec

@Miodec Miodec commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Also moves all test dom modifications to go through test ui. Some reading still happens outside it.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 16:58
@monkeytypegeorge monkeytypegeorge added the frontend User interface or web stuff label Oct 3, 2026
@github-actions github-actions Bot added the waiting for review Pull requests that require a review before continuing label Oct 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Large structural SolidJS migration of a core page with changed init ordering, lazy singletons, and an explicitly incomplete ("no typing for now") scope that warrants human verification.

Review effort: Balanced
Findings: None

What changed in this PR

Converts the test page from static HTML (test.html + test-result.html) to a SolidJS component (TestPage.tsx), while keeping the test internals vanilla ("no typing for now"). Because the page markup now renders on mount rather than existing at import time, module-level DOM refs become lazy and event bindings move to delegation on the static .pageTest wrapper; several singletons (carets, result chart, input listeners) are initialized from TestPage.onMount.

Changes:

  • New lazyQsr helper + widespread switch from qsr/qs to lazy refs for test-page elements; carets, result chart, and input listeners now created via init*() called in TestPage.onMount.
  • Vanilla click/handlers rewired to qs('.pageTest')?.onChild(...) delegation (using event.childTarget) so they work with Solid-rendered children.
  • mountComponents() moved earlier in index.ts; test subcomponents consolidated under TestPage; index.html mount point replaces the deleted HTML partials.
File Description
utils/​dom.ts Adds lazyQsr (deferred+cached qsr).
test/​test-ui.ts Lazy wordsEl/wordsWrapperEl/resultWordsHistoryEl; moves effect+listeners into init(); delegation bindings.
test/​result.ts Legend/favorite handlers switched to .pageTest delegation + childTarget.
test/​replay-ui.ts Lazy replayEl; delegation for replay buttons/letters.
test/​caret.ts, test/​pace-caret.ts Carets created lazily via initElement().
test/​funbox/​*-timer.ts qs→lazyQsr timer refs.
input/​listeners/​* Side-effect modules wrapped in init(); aggregated by initInputListeners().
input/​input-element.ts Lazy #wordsInput lookup.
controllers/​chart-controller.ts Result chart created lazily via initResultChart().
elements/​test-init-failed.ts, elements/​caret.ts Lazy refs + ElementWithUtils helpers.
event-handlers/​test.ts Quote/leaderboard handlers switched to delegation.
components/​pages/​test/​TestPage.tsx New Solid component rendering full test + result markup; onMount wiring.
components/​mount.tsx Consolidates test components into TestPage; matches [data-component=...].
index.ts Moves mountComponents() earlier; drops eager listeners import.
index.html, html/​pages/​test*.html Static mount div replaces deleted HTML partials.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@Miodec Miodec changed the title refactor: convert test page to solid js, no typing for now (@miodec) refactor: wrap typing page in solidjs (@miodec) Oct 4, 2026
@Miodec
Miodec merged commit 5935918 into master Oct 4, 2026
13 checks passed
@Miodec
Miodec deleted the solid-test branch October 4, 2026 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

frontend User interface or web stuff waiting for review Pull requests that require a review before continuing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants