Make sure plugin name selections are displayed consistently with sidebar, [Flipper] Make sure plugins have the same name everywhere
Summary: Not all plugin names are created equal in flipper. For example, plugins would bear different names in the sidebar and in the plugin selection when making a support request / flipper trace. Fixed this and also introduced a `getPluginTitle` utility that produces this name consistently. Plugin listview now also sort their items consitently with the sidebar. Probably also fixed an error in the flipper export screen, where a correct TS error was supressed. Reviewed By: jknoxville Differential Revision: D19499404 fbshipit-source-id: c5b23a170d41d96799eb7899e249f70778717d45
This commit is contained in:
committed by
Facebook Github Bot
parent
edd0e01a08
commit
82e65c68dc
@@ -34,6 +34,7 @@ import {selectPlugin} from './reducers/connections';
|
||||
import {State as StoreState} from './reducers/index';
|
||||
import textContent from './utils/textContent';
|
||||
import createPaste from './fb-stubs/createPaste';
|
||||
import {getPluginTitle} from './utils/pluginUtils';
|
||||
|
||||
type OwnProps = {
|
||||
onClear: () => void;
|
||||
@@ -429,7 +430,7 @@ class NotificationItem extends Component<
|
||||
const items = [];
|
||||
if (props.onHidePlugin && props.plugin) {
|
||||
items.push({
|
||||
label: `Hide ${props.plugin.title || props.plugin.id} plugin`,
|
||||
label: `Hide ${getPluginTitle(props.plugin)} plugin`,
|
||||
click: this.props.onHidePlugin,
|
||||
});
|
||||
}
|
||||
@@ -534,7 +535,7 @@ class NotificationItem extends Component<
|
||||
<FlexRow>
|
||||
{action && (
|
||||
<Button onClick={this.openDeeplink}>
|
||||
Open in {plugin.title}
|
||||
Open in {getPluginTitle(plugin)}
|
||||
</Button>
|
||||
)}
|
||||
<ButtonGroup>
|
||||
@@ -543,7 +544,7 @@ class NotificationItem extends Component<
|
||||
)}
|
||||
{onHidePlugin && (
|
||||
<Button onClick={onHidePlugin}>
|
||||
Hide {plugin.title}
|
||||
Hide {getPluginTitle(plugin)}
|
||||
</Button>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
|
||||
Reference in New Issue
Block a user