-
Notifications
You must be signed in to change notification settings - Fork 338
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
Disable DevTools pages based on the connected app type. #1757
Conversation
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.
Some comments, mostly about possible refactorings around enabled()
and the build() methods.
@@ -392,3 +392,57 @@ class OutlinedBorder extends StatelessWidget { | |||
/// | |||
/// Makes for nice-looking rectangles. | |||
final goldenRatio = 1 + sqrt(5) / 2; | |||
|
|||
class DisabledForProfileModeMessage extends StatelessWidget { |
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.
👍 I like the individual, specific messages telling why the page is disabled.
packages/devtools_app/lib/src/inspector/flutter/inspector_screen.dart
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/devtools_app/lib/src/timeline/flutter/timeline_screen.dart
bool get isRunningOnDartVM => serviceManager.vm.name != 'ChromeDebugProxy'; | ||
|
||
Future<bool> get isDartCliApp async => | ||
FutureOr<bool> get isDartCliApp async => |
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.
I think Future<bool>
is correct here.
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.
since isFlutterApp returns a FutureOr, wouldn't it be FutureOr?
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.
I think they can both be changed to Future
?
It's not a critical change.
style: Theme.of(context).textTheme.headline4, | ||
), | ||
), | ||
child: CenteredMessage('Sorry, $uri was not found.'), |
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.
We should definitely include a version of the chrome 404 dinosaur game here: https://lmgtfy.com/?q=chrome+404+dinosaur+game.
NetworkScreen screen; | ||
FakeServiceManager fakeServiceManager; | ||
|
||
group('NetworkScreen', () { |
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.
nice tests!
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.
Looks good! Some pretty minor comments.
When the page is not supported for the connected app, we show a full screen message explaining why the page is disabled.
Fixes #1669