Repository navigation
Conversation
|
|
✅ Deploy Preview for solid-docs-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Loading a lesson URL with
?solveddirectly (or refreshing after a client-side Solve, when the refresh goes through the trailing-slash redirect) showed the solved code in the editor, but the button still said "Solve" and linked back to?solved, so clicking it did nothing.The tutorial pages are prerendered, so the HTML is the same with or without the query and always renders "Solve". Hydration keeps that server text and
href, while the client-only REPL reads the real URL and loads the solution.The button now reads
?solvedonly after hydration, using a signal set inonSettled. This follows the pattern from the docs' SSR guide. The REPL still reads the query directly, since it only renders on the client.The solved state still lives only in the URL. Lesson links drop it, so leaving a lesson and coming back resets the code. That part is unchanged.
Verification
pnpm build, then I serveddist/clientwith a static server and ran a Playwright script covering a fresh load, clicking Solve, a refresh, clicking Reset and a direct/tutorial/welcome?solvedload. Each step showed the matching label andhref. On v2.solidjs.com, the direct load shows "Solve" withhref="/tutorial/welcome?solved".tsc --noEmitandprettier --checkpass.🤖 Generated with Claude Code