Allow selecting disabled, unsupported and not installed plugins
Summary: This diffs removes restrictions on selecting disabled, uninstalled and unsupported plugins. Now it will be possible to select them, however for now empty view will be shown in such case. In next diffs I'll add Plugin Info view which will be shown in case disabled plugin is selected. It will show static info about plugin - readme, version, oncall, user feedback group etc. This will make it possible for users to browse info about all plugins, even unsupported by selected device/app. There is one problem that our analytics will be screwed by this change as even disabled plugins will be counted as used. I'll address this later in this stack. If you see other potential problems with removing restrictions on selecting disabled plugins - please let me know. Reviewed By: passy Differential Revision: D29186005 fbshipit-source-id: 2e55c5fd3bb402594f4dbace6e287725de65bc6f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bf1b10c130
commit
7bc38c1735
@@ -84,9 +84,6 @@ export default class BaseDevice {
|
||||
// if imported, stores the original source location
|
||||
source = '';
|
||||
|
||||
// sorted list of supported device plugins
|
||||
devicePlugins: string[] = [];
|
||||
|
||||
sandyPluginStates: Map<string, _SandyDevicePluginInstance> = new Map<
|
||||
string,
|
||||
_SandyDevicePluginInstance
|
||||
@@ -248,7 +245,6 @@ export default class BaseDevice {
|
||||
return;
|
||||
}
|
||||
this.hasDevicePlugins = true;
|
||||
this.devicePlugins.push(plugin.id);
|
||||
if (plugin instanceof _SandyPluginDefinition) {
|
||||
this.sandyPluginStates.set(
|
||||
plugin.id,
|
||||
@@ -274,10 +270,6 @@ export default class BaseDevice {
|
||||
instance.destroy();
|
||||
this.sandyPluginStates.delete(pluginId);
|
||||
}
|
||||
const index = this.devicePlugins.indexOf(pluginId);
|
||||
if (index >= 0) {
|
||||
this.devicePlugins.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
|
||||
@@ -15,6 +15,5 @@ import BaseDevice, {OS} from './BaseDevice';
|
||||
export default class DummyDevice extends BaseDevice {
|
||||
constructor(serial: string, title: string, os: OS) {
|
||||
super(serial, 'dummy', title, os);
|
||||
this.devicePlugins = [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ export default class JSDevice extends BaseDevice {
|
||||
|
||||
constructor(serial: string, title: string, webContentsId: number) {
|
||||
super(serial, 'emulator', title, 'JSWebApp');
|
||||
this.devicePlugins = [];
|
||||
this.webContentsId = webContentsId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +145,6 @@ export default class MetroDevice extends BaseDevice {
|
||||
|
||||
constructor(serial: string, ws: WebSocket | undefined) {
|
||||
super(serial, 'emulator', 'React Native', 'Metro');
|
||||
this.devicePlugins = [];
|
||||
if (ws) {
|
||||
this.ws = ws;
|
||||
ws.onmessage = this._handleWSMessage;
|
||||
|
||||
Reference in New Issue
Block a user