From d996ab921c25cb4bbfa32b179bf32ab1e6353c22 Mon Sep 17 00:00:00 2001 From: Todd Volkert Date: Thu, 8 Mar 2018 12:54:06 -0800 Subject: [PATCH] Rename "slow mode" to be "debug mode" (#15205) This moves toward more consistency in our messaging. Apps are launched using --debug, so the banner will reflect the build mode. --- examples/catalog/bin/screenshot.dart.template | 2 +- examples/flutter_gallery/lib/gallery/home.dart | 2 +- packages/flutter/lib/src/material/app.dart | 2 +- packages/flutter/lib/src/widgets/app.dart | 2 +- packages/flutter/lib/src/widgets/banner.dart | 8 ++++---- packages/flutter/lib/src/widgets/widget_inspector.dart | 4 ++-- packages/flutter/test/widgets/banner_test.dart | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/examples/catalog/bin/screenshot.dart.template b/examples/catalog/bin/screenshot.dart.template index c939db7be7..4e8c57909a 100644 --- a/examples/catalog/bin/screenshot.dart.template +++ b/examples/catalog/bin/screenshot.dart.template @@ -36,6 +36,6 @@ class SampleScreenshotsState extends State { void main() { enableFlutterDriverExtension(); - WidgetsApp.debugAllowBannerOverride = false; // No "slow mode" banner. + WidgetsApp.debugAllowBannerOverride = false; // No "debug" banner. runApp(new SampleScreenshots()); } diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart index 8131adbbdf..694b89be92 100644 --- a/examples/flutter_gallery/lib/gallery/home.dart +++ b/examples/flutter_gallery/lib/gallery/home.dart @@ -202,7 +202,7 @@ class GalleryHomeState extends State with SingleTickerProviderState ) ); - // In checked mode our MaterialApp will show the default "slow mode" banner. + // In checked mode our MaterialApp will show the default "debug" banner. // Otherwise show the "preview" banner. bool showPreviewBanner = true; assert(() { diff --git a/packages/flutter/lib/src/material/app.dart b/packages/flutter/lib/src/material/app.dart index fa88eeaa67..30e14535c3 100644 --- a/packages/flutter/lib/src/material/app.dart +++ b/packages/flutter/lib/src/material/app.dart @@ -511,7 +511,7 @@ class MaterialApp extends StatefulWidget { /// reported by the framework. final bool showSemanticsDebugger; - /// Turns on a little "SLOW MODE" banner in checked mode to indicate + /// Turns on a little "DEBUG" banner in checked mode to indicate /// that the app is in checked mode. This is on by default (in /// checked mode), to turn it off, set the constructor argument to /// false. In release mode this has no effect. diff --git a/packages/flutter/lib/src/widgets/app.dart b/packages/flutter/lib/src/widgets/app.dart index 37a41310eb..259cd6460c 100644 --- a/packages/flutter/lib/src/widgets/app.dart +++ b/packages/flutter/lib/src/widgets/app.dart @@ -348,7 +348,7 @@ class WidgetsApp extends StatefulWidget { /// material package. final InspectorSelectButtonBuilder inspectorSelectButtonBuilder; - /// Turns on a "SLOW MODE" little banner in checked mode to indicate + /// Turns on a "DEBUG" little banner in checked mode to indicate /// that the app is in checked mode. This is on by default (in /// checked mode), to turn it off, set the constructor argument to /// false. In release mode this has no effect. diff --git a/packages/flutter/lib/src/widgets/banner.dart b/packages/flutter/lib/src/widgets/banner.dart index 7e713d1c29..db56e1c183 100644 --- a/packages/flutter/lib/src/widgets/banner.dart +++ b/packages/flutter/lib/src/widgets/banner.dart @@ -233,7 +233,7 @@ class BannerPainter extends CustomPainter { /// See also: /// /// * [CheckedModeBanner], which the [WidgetsApp] widget includes by default in -/// debug mode, to show a banner that says "SLOW MODE". +/// debug mode, to show a banner that says "DEBUG". class Banner extends StatelessWidget { /// Creates a banner. /// @@ -323,7 +323,7 @@ class Banner extends StatelessWidget { } } -/// Displays a [Banner] saying "SLOW MODE" when running in checked mode. +/// Displays a [Banner] saying "DEBUG" when running in checked mode. /// [MaterialApp] builds one of these by default. /// Does nothing in release mode. class CheckedModeBanner extends StatelessWidget { @@ -344,7 +344,7 @@ class CheckedModeBanner extends StatelessWidget { assert(() { result = new Banner( child: result, - message: 'SLOW MODE', + message: 'DEBUG', textDirection: TextDirection.ltr, location: BannerLocation.topEnd, ); @@ -358,7 +358,7 @@ class CheckedModeBanner extends StatelessWidget { super.debugFillProperties(description); String message = 'disabled'; assert(() { - message = '"SLOW MODE"'; + message = '"DEBUG"'; return true; }()); description.add(new DiagnosticsNode.message(message)); diff --git a/packages/flutter/lib/src/widgets/widget_inspector.dart b/packages/flutter/lib/src/widgets/widget_inspector.dart index 5c87b617f1..95a3f804a0 100644 --- a/packages/flutter/lib/src/widgets/widget_inspector.dart +++ b/packages/flutter/lib/src/widgets/widget_inspector.dart @@ -424,7 +424,7 @@ class WidgetInspectorService { /// Returns whether [Widget] creation locations are available. /// - /// [Widget] creation locations are only available for slow mode builds when + /// [Widget] creation locations are only available for debug mode builds when /// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 /// is required as injecting creation locations requires a /// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation). @@ -1127,7 +1127,7 @@ class _Location { /// Returns the creation location of an object if one is available. /// -/// Creation locations are only available for slow mode builds when +/// Creation locations are only available for debug mode builds when /// the `--track-widget-creation` flag is passed to `flutter_tool`. Dart 2.0 is /// required as injecting creation locations requires a /// [Dart Kernel Transformer](https://github.com/dart-lang/sdk/wiki/Kernel-Documentation). diff --git a/packages/flutter/test/widgets/banner_test.dart b/packages/flutter/test/widgets/banner_test.dart index 63e9ba6d60..1ab978725a 100644 --- a/packages/flutter/test/widgets/banner_test.dart +++ b/packages/flutter/test/widgets/banner_test.dart @@ -273,7 +273,7 @@ void main() { ..rotate(angle: math.PI / 4.0) ..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0x7f000000), hasMaskFilter: true) ..rect(rect: new Rect.fromLTRB(-40.0, 28.0, 40.0, 40.0), color: const Color(0xa0b71c1c), hasMaskFilter: false) - ..paragraph(offset: const Offset(-40.0, 24.0)) + ..paragraph(offset: const Offset(-40.0, 29.0)) ..restore ); });