Skip to content

NOVUS-391 Defer custom element registration to consumer#2

Open
tolson wants to merge 2 commits intomainfrom
tao-novus-391
Open

NOVUS-391 Defer custom element registration to consumer#2
tolson wants to merge 2 commits intomainfrom
tao-novus-391

Conversation

@tolson
Copy link
Copy Markdown
Collaborator

@tolson tolson commented Mar 29, 2026

Summary

  • Removed all 16 customElements.define() side-effect calls from individual component files
  • Added src/register.js exporting registerGuideComponents() which registers all elements with a customElements.get() guard
  • Consumers now call registerGuideComponents() when ready (e.g. in plugin initialize())

This fixes a NotSupportedError in staging where the html-guides plugin script loads twice, causing double registration of custom elements.

Test plan

  • All existing tests pass (updated test to call registerGuideComponents() before instantiating elements)
  • Verify pendo-client html-guides plugin works in staging with updated vendor file
  • Confirm no NotSupportedError when plugin script loads twice

🤖 Generated with Claude Code

Todd Olson and others added 2 commits March 9, 2026 21:35
Add parseAction() method to support multiple action formats:
- Array: [{"action":"submit-poll"},{"action":"dismiss"}]
- Object: {"action":"go-to-step","stepId":"abc"}
- String with param: go-to-step:abc123
- Simple string: dismiss

handleClick() now emits {actions: [...]} array instead of single action,
enabling composable multi-action buttons without combinatorial explosion
of composite action cases.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move all customElements.define() calls out of individual component files
into an exported registerGuideComponents() function. This prevents
NotSupportedError when the plugin script is loaded twice (e.g. staging),
since the consumer controls when registration happens.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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