Expand/Collapse Sidebar V0

Summary:
- Show all or show 5 LRU plugins
- Update when close/reopen app, collapse sidebar, or expand sidebar

Reviewed By: danielbuechele

Differential Revision: D16917950

fbshipit-source-id: 1e7edc86945162ea14e1cdaa89aa47d3defa4c7d
This commit is contained in:
Chaiwat Ekkaewnumchai
2019-08-21 08:48:25 -07:00
committed by Facebook Github Bot
parent 007a29805a
commit ea7578aa16
4 changed files with 25 additions and 54 deletions

View File

@@ -1,42 +0,0 @@
/**
* Copyright 2018-present Facebook.
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
* @format
*/
// copied from Flipper dashboard
const pluginRanking = [
'DeviceLogs',
'Inspector',
'Network',
'AnalyticsLogging',
'GraphQL',
'oculus-service-logs',
'UIPerf',
'CrashReporter',
'Msys',
'React',
'Databases',
'notifications',
'MobileConfig',
'FunnelLogger',
'Fresco',
'MScreen',
'Preferences',
'DeviceCPU',
'Hermesdebugger',
'vros-event-profiler',
'Mobileboost',
'Sections',
'Composer',
'Stories',
'DesignOverlay',
];
export function isTopUsedPlugin(pluginName: string, range: number): boolean {
const rank = pluginRanking.findIndex((name: string) => {
return name === pluginName;
});
return rank >= 0 && rank < range;
}