Notify Flutter inspector when navigating widget tree with keyboard#9810
Notify Flutter inspector when navigating widget tree with keyboard#9810muhammadkamel wants to merge 1 commit intoflutter:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request updates the InspectorTreeController to notify the Flutter inspector during keyboard navigation and adds corresponding widget tests. Feedback suggests optimizing the tree refresh logic by returning the result of the selection update to avoid unnecessary refreshes and refactoring duplicate helper functions in the test file to adhere to DRY principles.
df61e77 to
be048b4
Compare
be048b4 to
015e2ba
Compare
Fixes #9809
This PR updates keyboard navigation in the Inspector widget tree so that moving selection with the up/down arrow keys notifies the Flutter inspector, matching the behavior of selecting a widget with the mouse.
Previously, keyboard navigation updated the selected row in DevTools but did not notify the connected Flutter app. Now
setSelectedNodeis called withnotifyFlutterInspector: trueduring keyboard navigation, so the selected widget is reflected in the running app as expected.Added tests for both direct controller navigation and keyboard event navigation.
Tested with:
/Users/mohammadkamel/otlob.tech/flutter_fork/bin/flutter test test/screens/inspector/inspector_tree_test.dartResult:
8 passed.No before/after screenshots are included because this change does not alter the visual UI; it fixes keyboard interaction behavior.
Pre-launch Checklist
General checklist
///).Issues checklist
contributions-welcomeorgood-first-issuelabel.contributions-welcomeorgood-first-issuelabel. I understand this means my PR might take longer to be reviewed.Tests checklist
AI-tooling checklist
Feature-change checklist
release-notes-not-requiredlabel or left a comment requesting the label be added.packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md.