Skip to content
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

Add documentation links to More Debugging Options menu #3936

Merged
merged 2 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Member Author

Choose a reason for hiding this comment

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

these docs are added in @johnpryan's PR here: flutter/website#6975

);

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));
});
});
});
}