Skip to content

Consider event delegation in the WebUI controller #99

Description

@schalkneethling

Summary

The WebUI controller currently caches many individual DOM nodes and wires listeners directly to several control groups. As the UI gains more modes and actions, this may become fragile and noisy.

Proposal

Reconsider the controller approach and evaluate whether event delegation from the custom element root would make the implementation cleaner.

Questions

  • Can mode, format, file, token, validate, and generate controls be handled from fewer delegated listeners?
  • Would delegation reduce DOM query count and cached nullable fields?
  • Would the result be easier to maintain without making event handling harder to follow?
  • Are there accessibility or custom element event boundary concerns to account for?

Context

This came up while adding the experimental @Property generation mode to the existing validator WebUI.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    p3Low priority: polish, speculative, or weak immediate impact

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions