-
Notifications
You must be signed in to change notification settings - Fork 364
Add support for Debugger screen navigation history #4906
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| location, | ||
| focusLine: true, | ||
| final routerDelegate = DevToolsRouterDelegate.of(context); | ||
| routerDelegate.updateStateIfNotCurrent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just piecing this new system together: does the debugger have to listen for router updates somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can, but in this situation, it doesn't need to since the CodeViewController is handling the state update. For example, if we wanted to support history for debugger frame selection (not that I think we should do this), the DebuggerController would need to be able to listen to router updates to determine if it should update the currently selected frame.
kenzieschmoll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know we can't add a full integration test yet, but can you verify that the router state is updated when new nodes are clicked?
also, are routes popped off of the stack when you click back in the browser?
so for node selections 1 --> 2 --> 3, then back, then to 4, would the stack look like 1 --> 2 --> 4?
Yes, we should be able to verify that the currently selected node matches the current state in the router.
That's correct. We're using the standard browser history behavior here. |
packages/devtools_app/lib/src/screens/debugger/codeview_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/debugger/debugger_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/debugger/program_explorer_controller.dart
Outdated
Show resolved
Hide resolved
kenzieschmoll
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we test the routing.dart changes in routing_test.dart?
Done. |
| final params = {...currentConfig.args}; | ||
| final params = Map.of(currentConfig.args); | ||
| params.removeWhere((key, value) => value == null); | ||
| await SystemNavigator.selectMultiEntryHistory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this remove intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this isn't necessary.
Screen.Recording.2022-12-08.at.10.57.13.AM.mov
Note: this change will eventually need to be tested by browser integration tests (see #4902).