Skip to content

Switch live editing from CodeSandbox to StackBlitz across all platforms#57

Open
dobromirts wants to merge 2 commits into
masterfrom
dtsvetkov/switch-live-editing-to-sb
Open

Switch live editing from CodeSandbox to StackBlitz across all platforms#57
dobromirts wants to merge 2 commits into
masterfrom
dtsvetkov/switch-live-editing-to-sb

Conversation

@dobromirts
Copy link
Copy Markdown
Contributor

Related to IgniteUI/igniteui-documentation#246

  1. Hides the CodeSandbox button across all platforms (Angular, React, Web Components) due to multiple blocking upstream issues (#8884, #8883, #8074).

  2. All CodeSandbox logic is preserved and can be re enabled by uncommenting ~9 lines in addFooter().
    Switches all platforms to StackBlitz using sdk.openProject() (in-memory file bundling) instead of the GitHub URL approach, which freezes on large repos due to webcontainer-core#2075.

  3. Angular DV samples no longer use sharedData (non-DV boilerplate with src/app/ paths) — DV samples carry their own complete file set.

  4. Web Components samples patch package.json's start script at click-time to bind webpack-dev-server to 0.0.0.0 so StackBlitz WebContainers can route the preview.

  5. Backward compatible with prefix JSONs, paths starting with .. or ./samples/ are filtered out gracefully, falling back to the GitHub URL.

src/scripts/sample-widget.ts
addFooter() — CodeSandbox button commented out
AngularCodeService.init() — uses sdk.openProject() for both DV and non-DV; DV passes null for sharedData
XplatCodeService.init() — uses sdk.openProject() on successful JSON fetch; GitHub URL as fallback
XplatCodeService._openInStackBlitz() — new method, mirrors Angular's implementation with WC host fix
XplatCodeService._loadStackBlitzSdk() — new method, reuses same SDK loader pattern

@dobromirts dobromirts added the ❌ status: awaiting-test PRs awaiting manual verification label May 28, 2026
@Zneeky Zneeky added 💥 status: in-test PRs currently being tested and removed ❌ status: awaiting-test PRs awaiting manual verification labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💥 status: in-test PRs currently being tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants