cyberneticlibrary

Migrate Polymer dialogs to Lit

dialog-to-litcommandsetup L26
Vidyano/vidyano
What it does

Migrate Polymer Dialog component to Lit with proper content rendering

Best for

Bulk migrating Polymer dialog-based UIs to Lit while preserving dialog-specific behavior

Inputs
  • · [object Object]
Outputs
  • · [object Object]
Requires
  • · Lit library
  • · Dialog base class
  • · TypeScript
Preconditions

Polymer dialog source readable; Dialog base class available

Failure modes
  • · Using render() instead of renderContent() → content not wrapped
  • · Missing CSSResultGroup for style combination → styles lost
  • · Old template= code left → confusion during review
Trust signals
  • · Explains base class difference (Dialog vs WebComponent)
  • · Shows CSSResultGroup pattern
  • · Documents renderCloseButton() helper