Skip to content

Standardize Event System Across All Components #414

@anuragxxd

Description

@anuragxxd

Description:

Our component library lacks a consistent event naming and handling pattern across different packages. Each component may be using different event conventions, payloads, and bubbling behaviors. We need to standardize the event system to provide a predictable and consistent API for all consumers, whether they're using Web Components directly or through React bindings.

Expected Behaviour:

  • Unified event naming convention (e.g., ecc:component-action or component-action)
  • Consistent event payload structure with typed interfaces
  • Standardized custom event options (bubbles, composed, cancelable)
  • Documentation of all events emitted by each component
  • Type-safe event listeners for TypeScript users

Approach:

  1. Audit all existing components in packages/ to document current event usage
  2. Define standard event naming convention and payload structure
  3. Create shared event utilities/types in ecc-utils-design for reusable event helpers
  4. Update all components to use standardized events (breaking change - requires major version bump)
  5. Generate event documentation automatically from TypeScript definitions
  6. Update documentation site with event reference guide
  7. Provide migration guide for existing consumers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions