Skip to content

Commit

Permalink
Add documentation links to More Debugging Options menu (#3936)
Browse files Browse the repository at this point in the history
* Add documentation links to Enhance Tracing options

* Add documentation links to More Debugging Options menu
  • Loading branch information
kenzieschmoll authored Mar 30, 2022
1 parent bcf8368 commit 4c28b3f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ class EnhanceTracingButton extends StatelessWidget {
class MoreDebuggingOptionsButton extends StatelessWidget {
const MoreDebuggingOptionsButton({Key? key}) : super(key: key);

static const _width = 625.0;
static const _width = 720.0;

@override
Widget build(BuildContext context) {
Expand Down
12 changes: 9 additions & 3 deletions packages/devtools_app/lib/src/service/service_extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,12 @@ final disableClipLayers = ToggleableServiceExtensionDescription<bool>._(
disabledValue: false,
gaScreenName: analytics_constants.performance,
gaItem: analytics_constants.disableOpacityLayersOption,
description: 'Render all clipping effects during paint',
description: 'Render all clipping effects during paint.',
tooltip: '''Disable this option to check whether excessive use of clipping is
affecting performance. If performance improves with this option
disabled, try to reduce the use of clipping effects in your app.''',
documentationUrl:
'https://docs.flutter.dev/development/tools/devtools/performance#more-debugging-options',
);

final disableOpacityLayers = ToggleableServiceExtensionDescription<bool>._(
Expand All @@ -349,10 +351,12 @@ final disableOpacityLayers = ToggleableServiceExtensionDescription<bool>._(
disabledValue: false,
gaScreenName: analytics_constants.performance,
gaItem: analytics_constants.disableOpacityLayersOption,
description: 'Render all opacity effects during paint',
description: 'Render all opacity effects during paint.',
tooltip: '''Disable this option to check whether excessive use of opacity
effects is affecting performance. If performance improves with this
option disabled, try to reduce the use of opacity effects in your app.''',
documentationUrl:
'https://docs.flutter.dev/development/tools/devtools/performance#more-debugging-options',
);

final disablePhysicalShapeLayers =
Expand All @@ -372,11 +376,13 @@ final disablePhysicalShapeLayers =
disabledValue: false,
gaScreenName: analytics_constants.performance,
gaItem: analytics_constants.disableOpacityLayersOption,
description: 'Render all physical modeling effects during paint',
description: 'Render all physical modeling effects during paint.',
tooltip: '''Disable this option to check whether excessive use of physical
modeling effects is affecting performance (shadows, elevations, etc.).
If performance improves with this option disabled, try to reduce the
use of physical modeling effects in your app.''',
documentationUrl:
'https://docs.flutter.dev/development/tools/devtools/performance#more-debugging-options',
);

final httpEnableTimelineLogging = ToggleableServiceExtensionDescription<bool>._(
Expand Down
23 changes: 23 additions & 0 deletions packages/devtools_app/test/performance_screen_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,28 @@ void main() {
expect(find.byType(MoreInfoLink), findsNWidgets(3));
});
});

testWidgetsWithWindowSize(
'opens more debugging options overlay', windowSize,
(WidgetTester tester) async {
await tester.runAsync(() async {
await pumpPerformanceScreen(tester, runAsync: true);
await tester.pumpAndSettle();
expect(find.text('More debugging options'), findsOneWidget);
await tester.tap(find.text('More debugging options'));
await tester.pumpAndSettle();
expect(
find.richTextContaining(
'you will need to reproduce activity in your app'),
findsOneWidget,
);
expect(find.richTextContaining('Render Clip layers'), findsOneWidget);
expect(
find.richTextContaining('Render Opacity layers'), findsOneWidget);
expect(find.richTextContaining('Render Physical Shape layers'),
findsOneWidget);
expect(find.byType(MoreInfoLink), findsNWidgets(3));
});
});
});
}

0 comments on commit 4c28b3f

Please sign in to comment.