Move plugin installer away from immutable
Summary: Trying to get rid of immutable_table, which is used in only 3 places. One of them being the plugin installer. Reviewed By: jknoxville Differential Revision: D29295534 fbshipit-source-id: dfae9476635c3a8ebba9f1439905bae693fdfd57
This commit is contained in:
committed by
Facebook GitHub Bot
parent
729922e8ad
commit
5b4179d482
@@ -10,22 +10,21 @@
|
||||
import {
|
||||
FlexColumn,
|
||||
styled,
|
||||
ManagedTable_immutable,
|
||||
SearchInput,
|
||||
SearchBox,
|
||||
Button,
|
||||
colors,
|
||||
Spacer,
|
||||
TableRows_immutable,
|
||||
FlexRow,
|
||||
Glyph,
|
||||
Link,
|
||||
Text,
|
||||
LoadingIndicator,
|
||||
Tooltip,
|
||||
TableRows,
|
||||
ManagedTable,
|
||||
} from '../../ui';
|
||||
import React, {useCallback, useState, useEffect} from 'react';
|
||||
import {List} from 'immutable';
|
||||
import {reportPlatformFailures, reportUsage} from '../../utils/metrics';
|
||||
import reloadFlipper from '../../utils/reloadFlipper';
|
||||
import {registerInstalledPlugins} from '../../reducers/plugins';
|
||||
@@ -144,7 +143,7 @@ const PluginInstaller = function ({
|
||||
/>
|
||||
</SearchBox>
|
||||
</Toolbar>
|
||||
<ManagedTable_immutable
|
||||
<ManagedTable
|
||||
rowLineHeight={28}
|
||||
floating={false}
|
||||
multiline
|
||||
@@ -289,7 +288,7 @@ function useNPMSearch(
|
||||
query: string,
|
||||
onInstall: () => void,
|
||||
installedPlugins: Map<string, InstalledPluginDetails>,
|
||||
): TableRows_immutable {
|
||||
): TableRows {
|
||||
useEffect(() => {
|
||||
reportUsage(`${TAG}:open`);
|
||||
}, []);
|
||||
@@ -358,7 +357,7 @@ function useNPMSearch(
|
||||
})();
|
||||
}, [query, installedPlugins]);
|
||||
|
||||
const rows: TableRows_immutable = List(searchResults.map(createRow));
|
||||
const rows = searchResults.map(createRow);
|
||||
return rows;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ exports[`load PluginInstaller list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1n5hbjk-View-FlexBox-FlexColumn-Container e11hk09w0"
|
||||
class="css-p5h61d-View-FlexBox-FlexColumn-Container esta8x30"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="css-18abd42-View-FlexBox-FlexColumn ecr18to0"
|
||||
@@ -95,7 +96,10 @@ exports[`load PluginInstaller list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1n5hbjk-View-FlexBox-FlexColumn-Container e11hk09w0"
|
||||
class="css-p5h61d-View-FlexBox-FlexColumn-Container esta8x30"
|
||||
>
|
||||
<div
|
||||
class="css-18abd42-View-FlexBox-FlexColumn ecr18to0"
|
||||
>
|
||||
<div
|
||||
class="css-1xll39b-View-FlexBox-FlexRow-TableBodyRowContainer ehuguum1"
|
||||
@@ -240,6 +244,7 @@ exports[`load PluginInstaller list 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1lxv8hi-Container-Horizontal-SandyToolbarContainer e1ecpah20"
|
||||
>
|
||||
@@ -322,7 +327,8 @@ exports[`load PluginInstaller list with one plugin installed 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1n5hbjk-View-FlexBox-FlexColumn-Container e11hk09w0"
|
||||
class="css-p5h61d-View-FlexBox-FlexColumn-Container esta8x30"
|
||||
tabindex="0"
|
||||
>
|
||||
<div
|
||||
class="css-18abd42-View-FlexBox-FlexColumn ecr18to0"
|
||||
@@ -397,7 +403,10 @@ exports[`load PluginInstaller list with one plugin installed 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1n5hbjk-View-FlexBox-FlexColumn-Container e11hk09w0"
|
||||
class="css-p5h61d-View-FlexBox-FlexColumn-Container esta8x30"
|
||||
>
|
||||
<div
|
||||
class="css-18abd42-View-FlexBox-FlexColumn ecr18to0"
|
||||
>
|
||||
<div
|
||||
class="css-1xll39b-View-FlexBox-FlexRow-TableBodyRowContainer ehuguum1"
|
||||
@@ -542,6 +551,7 @@ exports[`load PluginInstaller list with one plugin installed 1`] = `
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="css-1lxv8hi-Container-Horizontal-SandyToolbarContainer e1ecpah20"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user