-
Notifications
You must be signed in to change notification settings - Fork 336
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
Offline support for Network page #8332
base: master
Are you sure you want to change the base?
Offline support for Network page #8332
Conversation
@hrajwade96 is this PR ready for review or is this still a work in progress? |
@kenzieschmoll just finishing up few things, I will mark it ready soon |
…into network_screen_offline_support
packages/devtools_app/lib/src/screens/network/network_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_controller.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/offline_network_data.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/network_screen.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/offline_network_data.dart
Outdated
Show resolved
Hide resolved
packages/devtools_app/lib/src/screens/network/offline_network_data.dart
Outdated
Show resolved
Hide resolved
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 a couple more comments. Thank you for all your work on this change!
Looks like there are several failing checks. Please also add an entry to NEXT_RELEASE_NOTES.md so that the release notes check passes. |
You will likely have several merge conflicts after pulling in the tip of the master branch. A change just landed that upgraded the Flutter version used in DevTools, which updated to a new version of the dart formatter. Here's what I recommend to make this merge simpler for you:
|
…fline_support # Conflicts: # packages/devtools_app/lib/src/screens/network/har_data_entry.dart # packages/devtools_app/lib/src/screens/network/network_screen.dart # packages/devtools_app/lib/src/shared/http/http_request_data.dart
…fline_support # Conflicts: # packages/devtools_app/lib/src/screens/network/network_screen.dart # packages/devtools_app/test/screens/network/offline_data_test.dart # packages/devtools_app/test/screens/network/sample_network_offline_data.json
aebe0d8
to
2a9cacf
Compare
@kenzieschmoll can you run the checks again, I have done the above steps, formatted the code and updated the release notes as well. |
I pushed a minor change that I had missed pushing earlier which was the primary cause of the checks failing. |
Looks like you still have some failing tests. Based on the errors it looks like you may need to set a global in the test setup for the failing tests: You can verify the tests pass locally by running |
Getting closer. Another failing test: Consider running all tests locally |
Yes I've fixed this one, I ran locally now there's just one test (below one) failing locally but mostly it's timezone bound, hence although it's failing locally, it should pass here.
|
A couple things look like they are still missing from this PR. I checked the code out locally and noticed that we do not have a way to export the offline network data. This is because the return Row(
children: [
if (!widget.offline) ...[
StartStopRecordingButton(
recording: _recording,
onPressed:
() async => await widget.controller.togglePolling(!_recording),
tooltipOverride:
_recording
? 'Stop recording network traffic'
: 'Resume recording network traffic',
minScreenWidthForTextBeforeScaling: double.infinity,
gaScreen: gac.network,
gaSelection: _recording ? gac.pause : gac.resume,
),
const SizedBox(width: denseSpacing),
ClearButton(
minScreenWidthForTextBeforeScaling:
_NetworkProfilerControls._includeTextWidth,
gaScreen: gac.network,
gaSelection: gac.clear,
onPressed: widget.controller.clear,
),
const SizedBox(width: denseSpacing),
DownloadButton(
tooltip: 'Download as .har file',
minScreenWidthForTextBeforeScaling:
_NetworkProfilerControls._includeTextWidth,
onPressed: widget.controller.exportAsHarFile,
gaScreen: gac.network,
gaSelection: gac.NetworkEvent.downloadAsHar.name,
),
const SizedBox(width: denseSpacing),
// TODO(kenz): fix focus issue when state is refreshed
Expanded(
child: SearchField<NetworkController>(
searchController: widget.controller,
searchFieldEnabled: hasRequests,
searchFieldWidth:
screenWidth <= MediaSize.xs
? defaultSearchFieldWidth
: wideSearchFieldWidth,
),
),
const SizedBox(width: denseSpacing),
Expanded(
child: StandaloneFilterField<NetworkRequest>(
controller: widget.controller,
filteredItem: 'request',
),
),
const SizedBox(width: denseSpacing),
OpenSaveButtonGroup(
screenId: ScreenMetaData.performance.id,
onSave: widget.controller.exportData,
),
],
],
); Once I added these buttons and then attempted to export network data, I am seeing an exception:
|
@kenzieschmoll, I wanted to clarify my understanding based on your comment:
|
I dug a little deeper on the errors I am encountering. These exceptions occur even for the "review history" behavior. Have you tested with requests that have an error? Some of the fields on We should also have test coverage for this case. |
Ok will check this case and also add test coverage for this |
Adding offline support to Network page.
issue link - #4470
List which issues are fixed by this PR.
Please add a note to
packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
if your change requires release notes. Otherwise, add the 'release-notes-not-required' label to the PR.Pre-launch Checklist
///
).If you need help, consider asking for help on Discord.