Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bkonyi
Copy link
Contributor

@bkonyi bkonyi commented Dec 8, 2022

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).

@bkonyi bkonyi requested a review from kenzieschmoll December 8, 2022 16:15
@bkonyi bkonyi requested review from a team and elliette as code owners December 8, 2022 16:15
@bkonyi bkonyi changed the title Add support for Debugger screen navigation history [ WIP ] Add support for Debugger screen navigation history Dec 8, 2022
location,
focusLine: true,
final routerDelegate = DevToolsRouterDelegate.of(context);
routerDelegate.updateStateIfNotCurrent(
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@kenzieschmoll kenzieschmoll left a 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?

@bkonyi
Copy link
Contributor Author

bkonyi commented Dec 13, 2022

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?

Yes, we should be able to verify that the currently selected node matches the current state in the router.

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?

That's correct. We're using the standard browser history behavior here.

@bkonyi bkonyi changed the title [ WIP ] Add support for Debugger screen navigation history Add support for Debugger screen navigation history Jan 3, 2023
@bkonyi bkonyi requested a review from CoderDake as a code owner January 3, 2023 19:56
Copy link
Member

@kenzieschmoll kenzieschmoll left a 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?

@bkonyi
Copy link
Contributor Author

bkonyi commented Feb 1, 2023

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was this remove intentional?

Copy link
Contributor Author

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.

@bkonyi bkonyi merged commit 02de2e7 into flutter:master Feb 3, 2023
@bkonyi bkonyi deleted the debugger_navigation_history branch February 3, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants