Skip to content

add docs for using SDK in Solid#898

Merged
hatemhosny merged 1 commit intodevelopfrom
solid-sdk
Oct 8, 2025
Merged

add docs for using SDK in Solid#898
hatemhosny merged 1 commit intodevelopfrom
solid-sdk

Conversation

@hatemhosny
Copy link
Copy Markdown
Collaborator

@hatemhosny hatemhosny commented Oct 8, 2025

Summary by CodeRabbit

  • New Features

    • Added Solid examples and a Solid tab to interactive code samples, alongside React, Vue, and Svelte.
    • Updated site navigation and homepage features to include Solid.
  • Documentation

    • Introduced a new Solid SDK guide with integration examples and usage details.
    • Updated README to list Solid among supported frameworks.
    • Expanded SDK docs: added Solid to the Usage section and linked from React, Vue, and Svelte pages.
    • Updated sidebar to include the Solid SDK page.

@netlify
Copy link
Copy Markdown

netlify Bot commented Oct 8, 2025

Deploy Preview for livecodes ready!

Name Link
🔨 Latest commit 064b529
🔍 Latest deploy log https://app.netlify.com/projects/livecodes/deploys/68e6ce35bd4cda000885d912
😎 Deploy Preview https://deploy-preview-898--livecodes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 8, 2025

Walkthrough

Adds Solid to SDK documentation and site: new Solid docs page, links and navigation updates, README update, and homepage copy changes. Enhances code example components to support a Solid tab by extending ShowCode props and rendering, and wiring Solid snippets in LiveCodes. Updates sidebar to include Solid under SDK.

Changes

Cohort / File(s) Summary of Changes
Docs index and README
README.md, docs/docs/sdk/index.mdx
Added Solid to supported frameworks and usage lists; adjusted wording/order to include Solid alongside Svelte; minor formatting tweaks.
Framework SDK docs
docs/docs/sdk/react.mdx, docs/docs/sdk/svelte.mdx, docs/docs/sdk/vue.mdx, docs/docs/sdk/solid.mdx
New Solid SDK page with examples and references. Added “Using SDK in Solid” related links to React/Svelte/Vue pages.
Docs navigation
docs/sidebars.ts
Inserted sdk/solid into SDK sidebar items before headless.
Homepage copy
docs/src/components/HomepageFeatures.tsx
Updated SDK links list to include Solid; reordered phrasing accordingly.
Code example wiring
docs/src/components/LiveCodes.tsx
Added SolidJS code snippet and passed it to ShowCode via solid prop; aligned structure with other framework examples.
Code example component
docs/src/components/ShowCode.tsx
Public prop surface expanded with solid: string; added state, formatting, and a new “Solid” tab rendering TSX code.

Sequence Diagram(s)

sequenceDiagram
  participant Page as Docs Page
  participant LiveCodes as LiveCodes Component
  participant ShowCode as ShowCode Component
  participant UI as Tabs UI

  Page->>LiveCodes: Render with examples
  LiveCodes->>ShowCode: Pass props { js, ts, react, vue, svelte, solid }
  Note over ShowCode: Initialize state for each code sample<br/>Format with tsx where applicable
  ShowCode->>UI: Render tabs (JS, TS, React, Vue, Svelte, Solid)
  UI-->>User: Display Solid tab with TSX sample
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

I hop through tabs—React, Vue, Svelte—
Now Solid joins the garden belt. 🌱
Sidebar paths and headings sing,
New code blocks bloom in polished spring.
With one more stack beneath my paw,
I thump, “Ship it!”—carrot in awe. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title clearly summarizes the main change of adding documentation for using the SDK in Solid and aligns with the files updated in the PR.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch solid-sdk

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Oct 8, 2025

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 8, 2025

Size Change: +77 B (+0.01%)

Total Size: 956 kB

ℹ️ View Unchanged
Filename Size Change
./build/404.html 1 kB 0 B
./build/app.html 250 B 0 B
./build/index.html 2.46 kB -2 B (-0.08%)
./build/livecodes/app.css 22.4 kB 0 B
./build/livecodes/app.js 111 kB +5 B (0%)
./build/livecodes/assets.js 8.59 kB -20 B (-0.23%)
./build/livecodes/assets/noop.js 18 B 0 B
./build/livecodes/assets/templates/diagrams-starter.html 2.19 kB 0 B
./build/livecodes/backup.js 3.73 kB +14 B (+0.38%)
./build/livecodes/blockly.js 13.3 kB 0 B
./build/livecodes/broadcast.js 1.19 kB +2 B (+0.17%)
./build/livecodes/bundle-types.js 4.37 kB 0 B
./build/livecodes/code-to-image.js 9.09 kB -2 B (-0.02%)
./build/livecodes/codejar.js 17.6 kB 0 B
./build/livecodes/codemirror.js 6.33 kB 0 B
./build/livecodes/compile.page.js 2.39 kB 0 B
./build/livecodes/compile.worker.js 14.3 kB 0 B
./build/livecodes/compiler-utils.js 3.18 kB 0 B
./build/livecodes/custom-editor-utils.js 198 B 0 B
./build/livecodes/deploy.js 6.87 kB -3 B (-0.04%)
./build/livecodes/editor-settings.js 17.7 kB -23 B (-0.13%)
./build/livecodes/embed-ui.js 5.55 kB -1 B (-0.02%)
./build/livecodes/embed.js 89.5 kB +29 B (+0.03%)
./build/livecodes/export.js 3.89 kB 0 B
./build/livecodes/firebase.js 22.7 kB 0 B
./build/livecodes/format.worker.js 13.4 kB 0 B
./build/livecodes/google-fonts.js 7.12 kB 0 B
./build/livecodes/headless.js 78.4 kB +110 B (+0.14%)
./build/livecodes/i18n-ar-language-info.json 5.23 kB 0 B
./build/livecodes/i18n-ar-translation.json 9.33 kB 0 B
./build/livecodes/i18n-de-language-info.json 5.25 kB 0 B
./build/livecodes/i18n-de-translation.json 9.44 kB 0 B
./build/livecodes/i18n-en-language-info.json 4.53 kB 0 B
./build/livecodes/i18n-en-translation.json 8.03 kB 0 B
./build/livecodes/i18n-es-language-info.json 5 kB 0 B
./build/livecodes/i18n-es-translation.json 9.17 kB 0 B
./build/livecodes/i18n-fa-language-info.json 5.35 kB 0 B
./build/livecodes/i18n-fa-translation.json 9.48 kB 0 B
./build/livecodes/i18n-fr-language-info.json 5.17 kB 0 B
./build/livecodes/i18n-fr-translation.json 9.42 kB 0 B
./build/livecodes/i18n-hi-language-info.json 5.78 kB 0 B
./build/livecodes/i18n-hi-translation.json 9.95 kB 0 B
./build/livecodes/i18n-it-language-info.json 5.04 kB 0 B
./build/livecodes/i18n-it-translation.json 9.26 kB 0 B
./build/livecodes/i18n-ja-language-info.json 5.57 kB 0 B
./build/livecodes/i18n-ja-translation.json 9.61 kB 0 B
./build/livecodes/i18n-pt-language-info.json 5.05 kB 0 B
./build/livecodes/i18n-pt-translation.json 9.35 kB 0 B
./build/livecodes/i18n-ru-language-info.json 5.56 kB 0 B
./build/livecodes/i18n-ru-translation.json 10.3 kB 0 B
./build/livecodes/i18n-ur-language-info.json 5.81 kB 0 B
./build/livecodes/i18n-ur-translation.json 9.78 kB 0 B
./build/livecodes/i18n-zh-CN-language-info.json 4.9 kB 0 B
./build/livecodes/i18n-zh-CN-translation.json 8.64 kB 0 B
./build/livecodes/i18n.js 20.2 kB +11 B (+0.05%)
./build/livecodes/import-src.js 16 kB 0 B
./build/livecodes/import.js 14.5 kB -15 B (-0.1%)
./build/livecodes/index.js 5.35 kB -28 B (-0.52%)
./build/livecodes/lang-art-template-compiler.js 1.65 kB 0 B
./build/livecodes/lang-assemblyscript-compiler.js 290 B 0 B
./build/livecodes/lang-assemblyscript-script.js 386 B 0 B
./build/livecodes/lang-astro-compiler.js 2.34 kB 0 B
./build/livecodes/lang-clio-compiler.js 1.55 kB 0 B
./build/livecodes/lang-commonlisp-script.js 123 B 0 B
./build/livecodes/lang-cpp-script.js 1.75 kB 0 B
./build/livecodes/lang-cpp-wasm-script.js 2.84 kB 0 B
./build/livecodes/lang-csharp-wasm-script.js 2.18 kB 0 B
./build/livecodes/lang-diagrams-compiler-esm.js 5.09 kB 0 B
./build/livecodes/lang-dot-compiler.js 1.66 kB 0 B
./build/livecodes/lang-ejs-compiler.js 1.63 kB 0 B
./build/livecodes/lang-eta-compiler.js 1.65 kB 0 B
./build/livecodes/lang-fennel-compiler.js 1.61 kB 0 B
./build/livecodes/lang-gleam-compiler.js 3.09 kB 0 B
./build/livecodes/lang-go-wasm-script.js 3.26 kB 0 B
./build/livecodes/lang-haml-compiler.js 1.65 kB 0 B
./build/livecodes/lang-handlebars-compiler.js 1.92 kB 0 B
./build/livecodes/lang-imba-compiler.js 147 B 0 B
./build/livecodes/lang-java-script.js 4.05 kB 0 B
./build/livecodes/lang-jinja-compiler.js 1.65 kB 0 B
./build/livecodes/lang-julia-script.js 3.3 kB 0 B
./build/livecodes/lang-liquid-compiler.js 1.68 kB 0 B
./build/livecodes/lang-lua-wasm-script.js 205 B 0 B
./build/livecodes/lang-malina-compiler.js 2.96 kB 0 B
./build/livecodes/lang-mustache-compiler.js 1.65 kB 0 B
./build/livecodes/lang-nunjucks-compiler.js 1.93 kB 0 B
./build/livecodes/lang-perl-script.js 268 B 0 B
./build/livecodes/lang-php-wasm-script.js 347 B 0 B
./build/livecodes/lang-postgresql-compiler-esm.js 1.73 kB 0 B
./build/livecodes/lang-prolog-script.js 204 B 0 B
./build/livecodes/lang-pug-compiler.js 371 B 0 B
./build/livecodes/lang-python-wasm-script.js 1.86 kB 0 B
./build/livecodes/lang-r-script-esm.js 2.44 kB 0 B
./build/livecodes/lang-rescript-compiler-esm.js 2.16 kB 0 B
./build/livecodes/lang-rescript-formatter.js 1.52 kB 0 B
./build/livecodes/lang-riot-compiler.js 2.81 kB 0 B
./build/livecodes/lang-ruby-wasm-script.js 1.71 kB 0 B
./build/livecodes/lang-scss-compiler.js 1.71 kB 0 B
./build/livecodes/lang-solid-compiler.js 263 B 0 B
./build/livecodes/lang-sql-compiler.js 1.64 kB 0 B
./build/livecodes/lang-sql-script.js 1.95 kB 0 B
./build/livecodes/lang-svelte-compiler.js 4.69 kB 0 B
./build/livecodes/lang-tcl-script.js 1.82 kB 0 B
./build/livecodes/lang-teal-compiler.js 1.72 kB 0 B
./build/livecodes/lang-twig-compiler.js 1.64 kB 0 B
./build/livecodes/lang-vento-compiler.js 1.68 kB 0 B
./build/livecodes/lang-vue-compiler.js 6.09 kB 0 B
./build/livecodes/lang-vue2-compiler.js 3.47 kB 0 B
./build/livecodes/lang-wat-compiler.js 348 B 0 B
./build/livecodes/lang-wat-script.js 1.58 kB 0 B
./build/livecodes/language-info.js 7.71 kB -5 B (-0.06%)
./build/livecodes/monaco-lang-astro.js 947 B 0 B
./build/livecodes/monaco-lang-clio.js 639 B 0 B
./build/livecodes/monaco-lang-imba.js 7.35 kB 0 B
./build/livecodes/monaco-lang-wat.js 2.46 kB 0 B
./build/livecodes/monaco.js 10.1 kB 0 B
./build/livecodes/open.js 6.2 kB +1 B (+0.02%)
./build/livecodes/processor-lightningcss-compiler.js 1.88 kB 0 B
./build/livecodes/processor-postcss-compiler.js 2.02 kB 0 B
./build/livecodes/processor-tailwindcss-compiler.js 5.19 kB 0 B
./build/livecodes/processor-unocss-compiler.js 355 B 0 B
./build/livecodes/processor-windicss-compiler.js 450 B 0 B
./build/livecodes/quill.css 697 B 0 B
./build/livecodes/quill.js 5.76 kB 0 B
./build/livecodes/resources.js 3.43 kB +2 B (+0.06%)
./build/livecodes/result-utils.js 1.17 kB 0 B
./build/livecodes/share.js 3.81 kB -1 B (-0.03%)
./build/livecodes/snippets.js 6.05 kB +5 B (+0.08%)
./build/livecodes/sync-ui.js 3.25 kB -2 B (-0.06%)
./build/livecodes/sync.js 3.52 kB 0 B
./build/livecodes/sync.worker.js 29.7 kB 0 B
./build/livecodes/templates.js 25.4 kB 0 B
./build/sdk/livecodes.js 3.96 kB 0 B
./build/sdk/livecodes.umd.js 4.02 kB 0 B
./build/sdk/package.json 291 B 0 B
./build/sdk/react.js 4.26 kB 0 B
./build/sdk/vue.js 4.35 kB 0 B

compressed-size-action

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying livecodes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 064b529
Status: ✅  Deploy successful!
Preview URL: https://f21a03e2.livecodes.pages.dev
Branch Preview URL: https://solid-sdk.livecodes.pages.dev

View logs

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
docs/docs/sdk/solid.mdx (1)

16-41: Consider adding a note about proper cleanup with async playground creation.

The code example has a potential race condition: if the component unmounts before createPlayground resolves, the cleanup function will run with playground being null, leaving the playground instance without proper cleanup.

This is similar to the first Svelte example in docs/docs/sdk/svelte.mdx. However, the Svelte docs include a second, recommended approach (lines 68-88) that properly handles cleanup by waiting for the promise to resolve.

Consider adding a similar note and recommended pattern for Solid:

const onMounted = (container: HTMLElement) => {
  const playgroundPromise = createPlayground(container, options);
  playgroundPromise.then((sdk) => {
    playground = sdk;
  });
  // Ensure cleanup waits for playground creation
  onCleanup(async () => {
    const sdk = await playgroundPromise;
    sdk?.destroy();
  });
};

Or add a note: "For proper cleanup that handles async initialization, see the recommended pattern in the Svelte documentation."

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a9d0bb and 064b529.

📒 Files selected for processing (10)
  • README.md (2 hunks)
  • docs/docs/sdk/index.mdx (2 hunks)
  • docs/docs/sdk/react.mdx (1 hunks)
  • docs/docs/sdk/solid.mdx (1 hunks)
  • docs/docs/sdk/svelte.mdx (1 hunks)
  • docs/docs/sdk/vue.mdx (1 hunks)
  • docs/sidebars.ts (1 hunks)
  • docs/src/components/HomepageFeatures.tsx (1 hunks)
  • docs/src/components/LiveCodes.tsx (2 hunks)
  • docs/src/components/ShowCode.tsx (3 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: Redirect rules - livecodes
  • GitHub Check: Header rules - livecodes
  • GitHub Check: Pages changed - livecodes
  • GitHub Check: tests (18.x, 2)
  • GitHub Check: tests (18.x, 5)
  • GitHub Check: tests (18.x, 1)
  • GitHub Check: tests (18.x, 4)
  • GitHub Check: tests (18.x, 3)
  • GitHub Check: build (18.x)
  • GitHub Check: build
  • GitHub Check: build (18.x)
🔇 Additional comments (16)
README.md (2)

122-122: LGTM!

The SDK feature list has been correctly updated to include Solid alongside the other supported frameworks.


159-159: LGTM!

The JavaScript SDK description now accurately reflects that both Svelte and Solid can be used directly without wrappers, which aligns with the documentation structure.

docs/docs/sdk/react.mdx (1)

151-151: LGTM!

The related links section has been correctly updated to include a reference to the Solid SDK documentation, maintaining consistency with the other SDK framework docs.

docs/sidebars.ts (1)

88-88: LGTM!

The sidebar configuration correctly adds the Solid SDK documentation page to the navigation. The placement before sdk/headless keeps all framework-specific SDK docs grouped together logically.

docs/docs/sdk/svelte.mdx (1)

100-100: LGTM!

The related links section has been updated to include the Solid SDK documentation reference, maintaining cross-linking consistency across all SDK framework docs.

docs/docs/sdk/vue.mdx (1)

166-166: LGTM!

The related links section correctly includes the Solid SDK documentation, completing the cross-reference pattern across all SDK framework docs.

docs/src/components/HomepageFeatures.tsx (1)

154-156: LGTM!

The SDK feature description has been properly updated to include Solid in the list of supported frameworks. The revised sentence structure improves readability by grouping all framework links together before mentioning the headless mode.

docs/docs/sdk/index.mdx (2)

13-13: LGTM!

The introductory paragraph now correctly states that both Svelte and Solid can be used directly without wrappers, which accurately represents the SDK's capabilities.


109-109: LGTM!

The Usage section has been properly updated to include Solid in the list of available SDK variations, completing the documentation structure.

docs/docs/sdk/solid.mdx (1)

1-86: LGTM with minor suggestion!

The Solid SDK documentation follows the established pattern from other framework docs and provides clear, working examples. The code uses appropriate SolidJS patterns (onCleanup, ref callbacks), imports are correct, and the related links section is complete.

docs/src/components/LiveCodes.tsx (2)

76-88: LGTM! Solid code snippet follows best practices.

The SolidJS integration code is well-structured and uses the correct ref callback pattern for executing code when the element mounts. The TypeScript syntax with type annotations aligns with SolidJS best practices.


113-113: LGTM! Consistent integration with ShowCode component.

The solid prop is correctly passed to the ShowCode component, following the same pattern used for other frameworks.

docs/src/components/ShowCode.tsx (4)

17-17: LGTM! Props correctly extended.

The solid: string prop is properly added to the component's props interface, maintaining consistency with other framework props.


24-24: LGTM! State initialization follows established pattern.

The solidCode state is properly initialized from props, consistent with the state management pattern used for other frameworks.


62-62: LGTM! Appropriate parser choice for Solid code.

Using the tsx parser for formatting solidCode is correct, as the SolidJS example uses TypeScript with JSX syntax.


103-105: LGTM! Solid tab properly configured.

The Solid tab is correctly implemented with appropriate language highlighting (tsx) and resize handler, maintaining consistency with other framework tabs.

@hatemhosny hatemhosny merged commit f025b25 into develop Oct 8, 2025
21 checks passed
@hatemhosny hatemhosny deleted the solid-sdk branch October 8, 2025 21:05
@coderabbitai coderabbitai Bot mentioned this pull request Nov 13, 2025
19 tasks
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.

1 participant