-
Notifications
You must be signed in to change notification settings - Fork 364
Add the ability to enable platform types from the device list in the sidebar #6688
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
Conversation
c6a9a36 to
f053298
Compare
…sidebar
For each unique platform type in the set of unsupported devices, this adds a new row ("Enable web for this project"). Clicking it triggers the same flow as VS Code (which currently involves a toast in the corner to confirm we can run `flutter create`).
In future we might want to change this prompt to be in the sidebar (so it's less likely you'll miss it).
Related PR for Dart-Code is at Dart-Code/Dart-Code#4831
See Dart-Code/Dart-Code#4820
See flutter#6563
f053298 to
4762233
Compare
|
|
||
| /// Analytics event that is sent when a platform type is selected to be enable | ||
| /// from the list of devices in the sidebar. | ||
| enablePlatformType; |
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.
should we record the platform type that is enabled here?
String enablePlatformType(String platformType) => 'enablePlatformType-$platformType';
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.
Done!
| final List<VsCodeDevice> devices; | ||
| final List<VsCodeDevice> unsupportedDevices; |
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.
nit: what about a single list of devices with a boolean field 'supported' so that we don't have to maintain two lists?
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.
It'll be slightly more complicated because we'd need DevTools to tell VS Code that it knows to check the flag (otherwise, new VS Code would include unsupported devices to old DevTools, and users would see "broken" devices in the list because the old Sidebar didn't filter them out).
We don't currently have capabilities in this direction (for VS Code to know what DevTools supports), but adding support for it might not be a bad idea (we're probably going to want it in future for other things).
(we could also base it on an SDK version number, but that's a little more awkward because we'd have to land the DevTools changes before we have a version number to code into VS Code)
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.
Gotcha. Keeping two lists sgtm then.
For each unique platform type in the set of unsupported devices, this adds a new row ("Enable web for this project"). Clicking it triggers the same flow as VS Code (which currently involves a toast in the corner to confirm we can run
flutter create).In future we might want to change this prompt to be in the sidebar (so it's less likely you'll miss it).
Related PR for Dart-Code is at Dart-Code/Dart-Code#4831
See Dart-Code/Dart-Code#4820
See #6563
enable-platform-type.mp4