Introduce emulatur launch dialog

Summary:
Changelog: Flipper can now launch iOS simulators by using `File > Launch Emulator...`

In the Sandy designs the device selector dropdown no longer shows the option to launch an emulator. So added a button to app inspect and the main menu instead.

I found it always a bit funny that we can launch android emulators, but not iOS emulators. Turns out that launching them is actually not very complex, so added capabilities to launch ios emulators

Reviewed By: jknoxville

Differential Revision: D24021737

fbshipit-source-id: c106cc2246921e008f9c808ebb811d8e333aa93b
This commit is contained in:
Michel Weststrate
2020-10-01 05:32:07 -07:00
committed by Facebook GitHub Bot
parent 4e6ecac43e
commit 17baa3084c
9 changed files with 273 additions and 45 deletions

View File

@@ -28,6 +28,7 @@ import constants from './fb-stubs/constants';
import {Logger} from './fb-interfaces/Logger';
import {NormalizedMenuEntry, buildInMenuEntries} from 'flipper-plugin';
import {StyleGuide} from './sandy-chrome/StyleGuide';
import {showEmulatorLauncher} from './sandy-chrome/appinspect/LaunchEmulator';
export type DefaultKeyboardAction = keyof typeof buildInMenuEntries;
export type TopLevelMenu = 'Edit' | 'View' | 'Window' | 'Help';
@@ -226,6 +227,12 @@ function getTemplate(
});
}
const fileSubmenu: MenuItemConstructorOptions[] = [
{
label: 'Launch Emulator...',
click() {
showEmulatorLauncher(store);
},
},
{
label: 'Preferences',
accelerator: 'Cmd+,',