devtools-ui-widgets
Installation
SKILL.md
UI Widget Framework Guide (MVP Architecture)
Adhere strictly to the Model-View-Presenter (MVP) architecture.
- Models (
front_end/models/): Handle business logic and application state. MUST NOT have knowledge of the UI. - Presenters (
Widget): Orchestrate data flow, manage UI-specific state, and handle interactions. - Views (
function): Purely presentational. Stateless functions that receive data/callbacks and render usinglit-html.
Refactoring Note: When refactoring legacy widgets to this framework, the widget's class name MUST NOT be changed. Truly reusable UI primitives (front_end/ui/components/**, front_end/ui/kit/**) stay custom elements (HTMLElement) and should not be migrated to DEFAULT_VIEW or UI.Widget, whereas single-use custom elements under front_end/panels/**/components/ used solely for encapsulation in one feature should migrate to UI.Widget with @scope to (devtools-widget > *) styles.