Add widgetConfig docs and interactive demo - #51
Merged
Conversation
Document all WidgetConfig fields and Elementor host patterns, and add a demo with help-center, visitor, and sandbox presets.
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.
Summary
widgetConfigguide covering all fields, layout defaults, v1/v2 usage, and production patterns from Elementor hosts (my.elementor help center + visitor floating widget).demo/load-sidebar-v2-widget-config/with three presets (helpCenter,visitor,sandbox), live resolved JSON, andwindow.angieConfigoverride support.Test plan
npm run demoand open/demo/load-sidebar-v2-widget-config/?preset=helpCenter?preset=visitorand?preset=sandboxand confirm layout/config changeswindow.angieConfigin the console and reload✨ PR Description
1. Problem & Context
Angie SDK lacks user-facing documentation and interactive examples for
widgetConfig— the key API for customizing embedded chat UI (copy, features, MCP focus). This PR ships comprehensive docs plus a production-patterned demo with runtime overrides.2. What Changed (Where)
src/load-sidebar-v2/widget-config.mdwindow.angieConfigruntime override patterndemo/load-sidebar-v2-widget-config/src/load-sidebar-v2/README.md,README.mdWidgetConfigtypedemo/index.html3. How It Works
Demo host (
host.js) reads?preset=param → buildswidgetConfigvia preset-specific builders → callssdk.loadSidebarV2({ widgetConfig })→ JS renders resolved config as JSON and highlights active preset. Users can overridewindow.angieConfigin console before reload to test copy/prompts without rebuilding.localServers.skipLoading: truepattern shown to avoid MCP registration race. CSS (demo-host.css) mirrors Elementor production UI tokens and right-docked sidebar layout.4. Risks
None material. Demo is isolated; docs are additive reference. Only note:
window.angieConfigoverride pattern in demo assumes hosts will inject that global — document clearly that this is optional and for iteration only, not production auth/secrets (already done in widget-config.md § Runtime overrides).Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how