Improve messaging when we don't have analysis data available for a frame (#6768)
diff --git a/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis.dart b/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis.dart index 8d92741..0656687 100644 --- a/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis.dart +++ b/packages/devtools_app/lib/src/screens/performance/panes/frame_analysis/frame_analysis.dart
@@ -35,7 +35,13 @@ final frameAnalysis = this.frameAnalysis; if (frameAnalysis == null) { return const Center( - child: Text('No analysis data available for this frame.'), + child: Text( + 'No analysis data available for this frame. This means that the ' + 'timeline events\nfor this frame occurred too long ago and DevTools ' + 'could not access them.\n\nTo avoid this, open the DevTools Performance ' + 'page earlier.', + textAlign: TextAlign.center, + ), ); } final rebuilds = rebuildCountModel.rebuildsForFrame(frameAnalysis.frame.id);
diff --git a/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/legacy/timeline_flame_chart.dart b/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/legacy/timeline_flame_chart.dart index 3a5638a..66fd2b1 100644 --- a/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/legacy/timeline_flame_chart.dart +++ b/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/legacy/timeline_flame_chart.dart
@@ -381,7 +381,7 @@ notificationService.push( 'No timeline events available for the selected frame. Timeline ' 'events occurred too long ago before DevTools could access them. ' - 'To avoid this, open the DevTools Performance page sooner.', + 'To avoid this, open the DevTools Performance page earlier.', ); return; }
diff --git a/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/perfetto/_perfetto_web.dart b/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/perfetto/_perfetto_web.dart index a16296a..5517750 100644 --- a/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/perfetto/_perfetto_web.dart +++ b/packages/devtools_app/lib/src/screens/performance/panes/timeline_events/perfetto/_perfetto_web.dart
@@ -183,7 +183,7 @@ notificationService.push( 'No timeline events available for the selected frame. Timeline ' 'events occurred too long ago before DevTools could access them. ' - 'To avoid this, open the DevTools Performance page sooner.', + 'To avoid this, open the DevTools Performance page earlier.', ); return; }
diff --git a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md index d1ee5a8..7839d24 100644 --- a/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md +++ b/packages/devtools_app/release_notes/NEXT_RELEASE_NOTES.md
@@ -21,7 +21,8 @@ ## Performance updates -TODO: Remove this section if there are not any general updates. +* Improve messaging when we do not have analysis data available for a Flutter +frame. - [#6768](https://github.com/flutter/devtools/pull/6768) ## CPU profiler updates
diff --git a/packages/devtools_app/test/performance/frame_analysis/frame_analysis_test.dart b/packages/devtools_app/test/performance/frame_analysis/frame_analysis_test.dart index 4905189..92e01a0 100644 --- a/packages/devtools_app/test/performance/frame_analysis/frame_analysis_test.dart +++ b/packages/devtools_app/test/performance/frame_analysis/frame_analysis_test.dart
@@ -69,7 +69,7 @@ await pumpAnalysisView(tester, null); expect( - find.text('No analysis data available for this frame.'), + find.textContaining('No analysis data available for this frame.'), findsOneWidget, ); expect(find.byType(FrameHints), findsNothing); @@ -84,7 +84,7 @@ await pumpAnalysisView(tester, frameAnalysis); expect( - find.text('No analysis data available for this frame.'), + find.textContaining('No analysis data available for this frame.'), findsNothing, ); expect(find.byType(FrameHints), findsOneWidget);