Commit 9857b65
authored
Notify Flutter inspector when navigating widget tree with keyboard (#9810)
* Notify Flutter inspector when navigating widget tree with keyboard
* Add inspector tree left/right keyboard navigation coverage
Updates inspector tree tests to cover left and right arrow navigation, including expand, next-row selection, and parent selection behavior. Also ensures left navigation to a parent notifies Flutter Inspector consistently with other keyboard selection changes.
* Fix inspector widget tree visibility issues during keyboard navigation
Resolves two regressions surfaced when navigating the inspector widget
tree with the arrow-left key.
1. Clicking a still-visible row used to call `expandPath` on the clicked
node, which re-expanded the clicked node itself and undid any subtree
collapses the user had just performed via the arrow-left key. Removed
the call from `onSelectNode`; programmatic selection flows (search,
on-device pick) continue to call `expandPath` via `syncTreeSelection`,
so external selection still works correctly.
2. Collapsing all the way to the root via the arrow-left key shrank the
visible rows down to a single row, which the inspector treated as a
"still loading" state and replaced with a spinner — hiding the user's
`[root]` row. Gated that branch on `!firstInspectorTreeLoadCompleted`
so the spinner only shows during the initial load; afterwards a
one-row tree renders as the legitimate single-row state.
Adds regression tests covering both behaviors.
* docs: add release notes for inspector keyboard navigation fixes (#9810)
* test: update inspector tree selection test for collapsed nodes1 parent a14ede6 commit 9857b65
3 files changed
Lines changed: 461 additions & 7 deletions
File tree
- packages/devtools_app
- lib/src/screens/inspector
- release_notes
- test/screens/inspector
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
| |||
399 | 402 | | |
400 | 403 | | |
401 | 404 | | |
402 | | - | |
403 | | - | |
| 405 | + | |
404 | 406 | | |
405 | 407 | | |
406 | 408 | | |
| |||
573 | 575 | | |
574 | 576 | | |
575 | 577 | | |
576 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
577 | 584 | | |
578 | 585 | | |
579 | 586 | | |
| |||
1142 | 1149 | | |
1143 | 1150 | | |
1144 | 1151 | | |
1145 | | - | |
1146 | | - | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
1147 | 1158 | | |
1148 | 1159 | | |
1149 | 1160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| |||
0 commit comments