Revert D30393320 and restructure fb only and public versions (#2703)
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/2703
- This diff reverts the following diff - D30393320 (75c4f20c8a)
- Moved the tests to 'fb/__tests__' . Previously they were not under fb which was causing the github version to break
- Also moved all the troubleshooting guide components into the fb/ directory under appinspect
Reviewed By: passy
Differential Revision: D30393785
fbshipit-source-id: caf3680c542eb9ca3c6f817c5a69d533245cf304
This commit is contained in:
committed by
Facebook GitHub Bot
parent
39145f46a5
commit
648e281377
@@ -29,7 +29,8 @@ import BaseDevice, {OS} from '../../server/devices/BaseDevice';
|
|||||||
import Client from '../../Client';
|
import Client from '../../Client';
|
||||||
import {State} from '../../reducers';
|
import {State} from '../../reducers';
|
||||||
import {brandColors, brandIcons, colors} from '../../ui/components/colors';
|
import {brandColors, brandIcons, colors} from '../../ui/components/colors';
|
||||||
import TroubleshootingGuide from './fb-stubs/TroubleshootingGuide';
|
import {TroubleshootingGuide} from './fb-stubs/TroubleshootingGuide';
|
||||||
|
import GK from '../../fb-stubs/GK';
|
||||||
|
|
||||||
const {Text} = Typography;
|
const {Text} = Typography;
|
||||||
|
|
||||||
@@ -108,7 +109,8 @@ export function AppSelector() {
|
|||||||
</Dropdown>
|
</Dropdown>
|
||||||
</Radio.Group>
|
</Radio.Group>
|
||||||
) : (
|
) : (
|
||||||
<TroubleshootingGuide />
|
// GK check to decide if troubleshooting guide will be visible or not
|
||||||
|
<TroubleshootingGuide showGuide={GK.get('flipper_self_sufficiency')} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {NoDevices} from '../NoDevices';
|
import {NoDevices} from '../NoDevices';
|
||||||
|
|
||||||
export default function TroubleshootingGuide() {
|
export function TroubleshootingGuide(_props: {showGuide: boolean}) {
|
||||||
return <NoDevices />;
|
return <NoDevices />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the MIT license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree.
|
|
||||||
*
|
|
||||||
* @format
|
|
||||||
*/
|
|
||||||
|
|
||||||
import React from 'react';
|
|
||||||
import {Button, Modal} from 'antd';
|
|
||||||
import {Layout} from 'flipper-plugin';
|
|
||||||
import {getInstance as getFormInstance} from '../../../fb-stubs/Logger';
|
|
||||||
import {useDispatch} from '../../../utils/useStore';
|
|
||||||
import {setStaticView} from '../../../reducers/connections';
|
|
||||||
import SupportRequestFormV2 from '../../../fb-stubs/SupportRequestFormV2';
|
|
||||||
import {Tracked} from 'flipper-plugin';
|
|
||||||
|
|
||||||
export function GuideEndScreen(props: {
|
|
||||||
showModal: boolean;
|
|
||||||
toggleModal: (arg0: boolean) => void;
|
|
||||||
}) {
|
|
||||||
const dispatch = useDispatch();
|
|
||||||
const problemSolved = () => {
|
|
||||||
props.toggleModal(false);
|
|
||||||
};
|
|
||||||
const loadForm = () => {
|
|
||||||
getFormInstance().track('usage', 'support-form-source', {
|
|
||||||
source: 'sidebar',
|
|
||||||
group: undefined,
|
|
||||||
});
|
|
||||||
dispatch(setStaticView(SupportRequestFormV2));
|
|
||||||
problemSolved();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Modal
|
|
||||||
title="Has your problem been solved OR do you want to file a support request?"
|
|
||||||
visible={props.showModal}
|
|
||||||
width={650}
|
|
||||||
footer={null}
|
|
||||||
onCancel={() => props.toggleModal(false)}
|
|
||||||
bodyStyle={{maxHeight: 800, overflow: 'auto'}}>
|
|
||||||
<Layout.Horizontal gap="huge">
|
|
||||||
<Tracked>
|
|
||||||
<Button
|
|
||||||
type="primary"
|
|
||||||
style={{flex: 1, marginBottom: 18}}
|
|
||||||
onClick={problemSolved}>
|
|
||||||
Problem Solved
|
|
||||||
</Button>
|
|
||||||
</Tracked>
|
|
||||||
</Layout.Horizontal>
|
|
||||||
<Layout.Horizontal gap="huge">
|
|
||||||
<Tracked>
|
|
||||||
<Button type="primary" style={{flex: 1}} onClick={loadForm}>
|
|
||||||
File Support Request
|
|
||||||
</Button>
|
|
||||||
</Tracked>
|
|
||||||
</Layout.Horizontal>
|
|
||||||
</Modal>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user