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
@@ -1399,7 +1399,6 @@ test('Sandy device plugins are exported / imported properly', async () => {
|
||||
const device2 = store.getState().connections.devices[1];
|
||||
expect(device2).not.toBeFalsy();
|
||||
expect(device2).not.toBe(device);
|
||||
expect(device2.devicePlugins).toEqual([sandyDeviceTestPlugin.id]);
|
||||
|
||||
const {counter} = device2.sandyPluginStates.get(
|
||||
sandyDeviceTestPlugin.id,
|
||||
|
||||
@@ -35,30 +35,6 @@ export function initializeFlipperLibImplementation(
|
||||
GK(gatekeeper: string) {
|
||||
return GK.get(gatekeeper);
|
||||
},
|
||||
isPluginAvailable(device, client, pluginId) {
|
||||
// supported device pluin
|
||||
if (device.devicePlugins.includes(pluginId)) {
|
||||
return true;
|
||||
}
|
||||
if (client) {
|
||||
// plugin supported?
|
||||
if (client.plugins.includes(pluginId)) {
|
||||
// part of an archived device?
|
||||
if (device.isArchived) {
|
||||
return true;
|
||||
}
|
||||
// plugin enabled?
|
||||
if (
|
||||
store
|
||||
.getState()
|
||||
.connections.enabledPlugins[client.query.app]?.includes(pluginId)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
selectPlugin(device, client, pluginId, deeplink) {
|
||||
store.dispatch({
|
||||
type: 'SELECT_PLUGIN',
|
||||
|
||||
Reference in New Issue
Block a user