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.
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
Context
This came up while adding the experimental @Property generation mode to the existing validator WebUI.