Refactor the default plugins and validation logic into Group object

Summary: This diff refactors the scattered logic of required plugins and default selection of the plugins into Group class. Also the same class handles the deeplink logic.

Reviewed By: mweststrate

Differential Revision: D19666745

fbshipit-source-id: c9427f0ddba643f0b32aac7b6f2496e2e3248b12
This commit is contained in:
Pritesh Nandgaonkar
2020-02-03 10:06:07 -08:00
committed by Facebook Github Bot
parent 9369033d99
commit 670949b016
4 changed files with 185 additions and 109 deletions

View File

@@ -27,4 +27,9 @@ export default Object.freeze({
IS_PUBLIC_BUILD: true,
FEEDBACK_GROUP_LINK: 'https://github.com/facebook/flipper/issues',
// Workplace Group ID's
LITHO_SUPPORT_GROUP_ID: 0,
GRAPHQL_ANDROID_SUPPORT_GROUP_ID: 0,
GRAPHQL_IOS_SUPPORT_GROUP_ID: 0,
});

View File

@@ -1,21 +0,0 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {Groups} from '../../reducers/supportForm';
import {State as PluginState} from '../../reducers/plugins';
import Client from '../../Client';
export function defaultSelectedPluginsForGroup(
_grp: Groups,
_plugins: PluginState,
_selectedClient: Client | undefined,
_userStarredPlugins: {[client: string]: Array<string>},
): Array<string> {
return [];
}