Add support manager to display an error screen or litho form
Summary: This diff shows the error screen when one of the following condition is met: - Selected device is not android - No clients are active for selected device - At least there is one client which supports inspector plugin. For this I have added a SupportRequestManager class which loads the error screen or the litho form based on the above condition. The UI is super basic. Will improve the design based on your feedback in the coming diffs. Reviewed By: jknoxville Differential Revision: D17790596 fbshipit-source-id: 2afc917c93c6e7321399633c5bf9d27a703742ee
This commit is contained in:
committed by
Facebook Github Bot
parent
e5ddb5d709
commit
f924b0ae1b
@@ -44,7 +44,7 @@ import {
|
||||
SHOW_REMAINING_PLUGIN_IF_LESS_THAN,
|
||||
} from '../Client';
|
||||
import {StyledOtherComponent} from 'create-emotion-styled';
|
||||
import SupportRequestForm from '../fb-stubs/SupportRequestForm';
|
||||
import SupportRequestFormManager from '../fb-stubs/SupportRequestFormManager';
|
||||
|
||||
const ListItem = styled('div')(({active}: {active?: boolean}) => ({
|
||||
paddingLeft: 10,
|
||||
@@ -304,18 +304,20 @@ class MainSidebar extends PureComponent<Props> {
|
||||
)}
|
||||
{GK.get('flipper_support_requests') && (
|
||||
<ListItem
|
||||
active={staticView != null && staticView === SupportRequestForm}
|
||||
onClick={() => setStaticView(SupportRequestForm)}>
|
||||
active={
|
||||
staticView != null && staticView === SupportRequestFormManager
|
||||
}
|
||||
onClick={() => setStaticView(SupportRequestFormManager)}>
|
||||
<PluginIcon
|
||||
color={colors.light50}
|
||||
name={'app-dailies'}
|
||||
isActive={
|
||||
staticView != null && staticView === SupportRequestForm
|
||||
staticView != null && staticView === SupportRequestFormManager
|
||||
}
|
||||
/>
|
||||
<PluginName
|
||||
isActive={
|
||||
staticView != null && staticView === SupportRequestForm
|
||||
staticView != null && staticView === SupportRequestFormManager
|
||||
}>
|
||||
Litho Support Request
|
||||
</PluginName>
|
||||
|
||||
Reference in New Issue
Block a user