Add extensible component inspectors to DevTools

Aperta
#4,174 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
dart, flutter
Ambito
devtools, game-dev

Direzione di ricerca

Start by reviewing the smaller inspector issues and the connector registered through DevToolsService.registerConnector in flame_behavior_tree. Read doc/flame/other/debug.md for the existing debugging context. Done means the inspector API and JSON format are documented, a custom inspector can add a section without changing flame_devtools, read-only properties remain uneditable, and a throwing inspector does not break the panel.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Problem to solve

The fields in the DevTools extension are hardcoded for a few component types. Games and bridge packages can't show their own properties, so each new type needs changes to both flame and flame_devtools.

Proposal

Add a data-driven inspector API, where the game describes each component's properties and the extension renders them generically.

  • A game-side inspector takes a Component and returns a titled section, or nothing if it doesn't apply. Sections appear in order.
  • Each property has a label, type, current value, optional description, and whether it is editable. Types should cover at least double, int, bool, string, Vector2 and Anchor. Doubles can also have a step, min and max.
  • Getters and setters are closures, so they stay in the game. Only the description goes to the extension as JSON. Writes come back by section and property name.
  • Packages register inspectors through DevToolsService.registerConnector, like flame_behavior_tree does for its connector.
Acceptance criteria
  • The JSON format is documented.
  • A custom inspector can add a section without changing flame_devtools.
  • Read-only properties can't be edited.
  • An inspector that throws doesn't break the rest of the panel.
  • The built-in fields are moved to the new API, or a follow-up issue covers that.
  • The API is documented in doc/flame/other/debug.md.
More information

Part of the work to move the flame_studio debugging features to flame_devtools. This is best done after the smaller inspector issues, so the design covers the real cases.

Lingua principale
Dart
Stelle
10.8k
Fork
1.1k
Merge medio
1g 21h
PR unite (30g)
50

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di flame-engine/flame

Tutte le issue di flame-engine/flame

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.