Skip to content

[spike] Give the tutorial REPL its dark theme - #1671

Closed
brenelz wants to merge 17 commits into
v2-rebuildfrom
spike/tutorial-repl-theme
Closed

brenelz wants to merge 17 commits into
v2-rebuildfrom
spike/tutorial-repl-theme

Conversation

@brenelz

@brenelz brenelz commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator
  • I have read the Contribution guide
  • This PR references an issue (except for typos, broken links, or other minor problems)

Description(required)

This targets the spike branch in #1670, not v2-rebuild.

In dark mode, the tutorial's code editor turned dark but the REPL panels around it stayed light. The REPL's dark styles are Panda _dark conditions and dockview overrides that match a .dark class on an ancestor of #app. SolidBase marks dark mode only with data-theme on <html>, so those styles never applied. The editor was dark only because it reads the dark prop directly.

Changes:

  • src/tutorials/repl.tsx adds the .dark class to <html> while the REPL's dark prop is true and removes it when the REPL unmounts. The docs' Tailwind dark: variant matches [data-theme*='dark'], so the extra class does not change the rest of the site.
  • The editor and preview area gets 8px of padding, the same as the gap between the REPL's panels. Without it, the blue border on the focused panel ran into the lesson pane's divider and the header line.

Verified on a production build (vite build, dist/client served statically) in headless Chromium:

  • An explicit dark theme, the system dark theme (data-theme="sdark"), and switching between light and dark from the theme menu all give matching REPL panels and editor.
  • There were no page errors.
  • pnpm check:types, ESLint, and Prettier pass on the changed files.

Dark:

Tutorial in dark mode

Light:

Tutorial in light mode

Related issues & labels

  • Suggested label(s) (optional): spike

🤖 Generated with Claude Code

claude and others added 12 commits October 27, 2026 15:48
…rt mode)

Replace SolidStart + Nitro with @solidjs/vite-plugin start mode and
SolidBase's own prerender; port the osmium theme to Solid 2 APIs
(Errored, Loading, onSettled, omit/merge, class arrays, For keyed={false},
clientOnly from @solidjs/web), swap solid-heroicons and solid-list for
~icons/heroicons and a local list helper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
- Track route changes in the sidebar tab with a derived signal (drops useBeforeLeave).
- Stop destructuring useLocale() (its getters are memos).
- untrack initial/fixed reads in TabGroup and search rows; untrack preload in the effect.
- Vendor the SolidBase #174 and filesystem-routing #36 builds under spike/.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
Dev's 42-lesson Solid 2 curriculum (devagrawal09/solid-site codex/solid-v2)
rendered with the playground's solid-repl (solid-playground#201, vendored
build under spike/).

- Lesson text loads as lazy() components and the files as plain data, so
  the prerendered page hydrates without refetching.
- solidjs.com lesson ids redirect through a generated _redirects file.
- The REPL workers skip re-minification: minifying the prebuilt TypeScript
  worker again breaks its initialization order.
- Header gets a Tutorial link; the layout goes full-bleed under /tutorial.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
- Router 2 preloads links only when asked; restore SolidStart's hover/focus
  preload with intentPreload(). Page chunks match the Solid 1 build.
- The REPL's Panda layers were declared after Tailwind's, so its reset beat
  Tailwind utilities (the Solve button and docs pages lost their padding
  once the tutorial loaded). Declare the layer order up front.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
SolidBase 2.0.0 (kobaltedev/solidbase#174) replaces the vendored build. It
pins @solidjs/router 2.0.0-next.37, so an override keeps the site on one
router copy (next.42).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

claude and others added 5 commits October 27, 2026 22:11
Introduction (JSX and components before signals), Components, Stores,
Async, Mutations, then Effects and the DOM. Each starter shows a visible
problem the lesson's API fixes. New lessons: projections, streams,
optimistic stores, until. Former lesson ids alias to their new lesson.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
…console shows

The REPL only opens the entry file, so lesson files like card.jsx stayed
hidden, also after Solve. Remount the REPL per lesson and on Solve/Reset
with a layout that opens all files.

The playground console (chobitsu) does not forward console.count, so the
memos and projections lessons log with console.log instead; projections
now reports how many rows re-checked per click.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
States load, cities load for the selected state, and the selected city
derives from the city list. Shows async writable derived state, a held
update that never tears the selection line, and isPending on the
dependent control. Course is now 35 lessons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
esm.sh serves production builds unless a URL asks for dev, so lessons
that point at a dev warning (props, loading, optimistic stores) showed
nothing. The REPL wrapper now seeds a pinned import map with the dev
builds of solid-js, solid-js/internal and @solidjs/web.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
SolidBase marks dark mode with data-theme, but the REPL's dark styles need a .dark class on an ancestor of #app, so its panels stayed light.
@brenelz
brenelz force-pushed the spike/tutorial-repl-theme branch from d864a2c to 174d6b2 Compare October 28, 2026 01:48
ryansolid pushed a commit that referenced this pull request Oct 29, 2026
SolidBase marks dark mode with data-theme, but the REPL's dark styles need a
.dark class on an ancestor, so its panels stayed light. From #1671.

Co-authored-by: Brenley Dueck <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117BoWPLXmEUSKddsQSHkzN
ryansolid added a commit that referenced this pull request Oct 29, 2026
Ports v2-rebuild to Solid 2 rc.20, router next.42, Kobalte alpha.4 and SolidBase 2, and adds a /tutorial route with 35 interactive lessons running on solid-repl 1.0.1.

Includes #1671 (REPL dark theme) and #1672 (lesson helper imports).

Co-authored-by: Brenley Dueck <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Base automatically changed from claude/project-thread-fpqdr5 to v2-rebuild October 29, 2026 20:11

Copy link
Copy Markdown
Member

Thanks! This is in v2-rebuild now. It was applied on top of the simplified REPL wrapper as f10ecac (with you as co-author) and shipped in the #1670 squash merge, e7f3d56. Closing since the change is included.


Generated by Claude Code

@ryansolid ryansolid closed this Oct 29, 2026
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.

3 participants