Add live updates for the component tree and selected component in DevTools

Abierto
#4,173 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
dart, flutter

Línea de trabajo

Start by reading the existing behavior-tree polling and the component tree and selection refresh entry points in flame_devtools; inspect how getComponentTree builds the tree and how component.hashCode identifies components. Done means polling can be disabled, manual refresh remains available, and the listed UI state and connection behaviors are preserved. Measure the cost on a scene with many components and record the result in the PR.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Problem to solve

The component tree and the selected component only update through the manual refresh button, so the values go stale as soon as the game moves on. Only the behavior tree section polls today, every 500 ms.

Proposal

Keep the extension up to date automatically by polling.

  • Poll the selected component often, around every 100 ms. This should be cheap because it is a single component.
  • Poll the tree less often, around every 300 ms or slower. getComponentTree builds the whole tree on every call, including toString and attributes for each component, so measure this on a large game before picking the interval.
  • Add a way to turn live updates off, and keep manual refresh.

component.hashCode is used as the ID, so a component keeps its ID across refreshes. The UI should use that to preserve state.

Acceptance criteria
  • Selection, expanded nodes and scroll position survive a refresh.
  • A field being edited isn't overwritten by a poll.
  • The selection clears cleanly when the selected component is removed from the game.
  • A new poll doesn't start while the previous one is still running.
  • Polling stops when the extension isn't connected.
  • The cost on the running game is measured on a scene with many components, and the result is noted in the PR.
More information

Part of the work to move the flame_studio debugging features to flame_devtools.

Lenguaje dominante
Dart
Estrellas
10.8k
Forks
1.1k
Merge medio
1 d 21 h
PR fusionados (30 d)
62

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flame-engine/flame

Todos los issues de flame-engine/flame

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.