Remove non-Sandy UI

Summary:
This removes the Non-Sandy UI from the Flipper codebase. It is a pretty rough scan for unused components, over time when converting more advanced components to Ant design probably even more code can be removed.

Partially used `npx ts-purge` to reveal never imported source files.

Changelog: It is no longer possible to opt out of the new Sandy UI

Reviewed By: jknoxville

Differential Revision: D25825282

fbshipit-source-id: 9041dbc7e03bce0760c9a0a34f1877851b5f06cf
This commit is contained in:
Michel Weststrate
2021-01-25 04:45:28 -08:00
committed by Facebook GitHub Bot
parent ba74b074c2
commit 12e59afdc6
44 changed files with 343 additions and 3386 deletions

View File

@@ -18,7 +18,7 @@ import {
useTrackedCallback,
useValue,
} from 'flipper-plugin';
import {navPluginStateSelector} from '../../chrome/LocationsButton';
import {State} from '../../reducers';
// eslint-disable-next-line flipper/no-relative-imports-across-packages
import type {NavigationPlugin} from '../../../../plugins/navigation/index';
@@ -136,3 +136,15 @@ const StyledAutoComplete = styled(AutoComplete)({
flex: 1,
},
});
const NAVIGATION_PLUGIN_ID = 'Navigation';
function navPluginStateSelector(state: State) {
const {selectedApp, clients} = state.connections;
if (!selectedApp) return undefined;
const client = clients.find((client) => client.id === selectedApp);
if (!client) return undefined;
return client.sandyPluginStates.get(NAVIGATION_PLUGIN_ID)?.instanceApi as
| undefined
| NavigationPlugin;
}