From 648e281377f79fa82b62cf4d2f301678527ecc86 Mon Sep 17 00:00:00 2001 From: Ananya Arun Date: Thu, 19 Aug 2021 02:30:30 -0700 Subject: [PATCH] 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 (https://github.com/facebook/flipper/commit/75c4f20c8a66b257aa81dd5cd27077fb60621f51) - 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 --- .../sandy-chrome/appinspect/AppSelector.tsx | 6 +- .../fb-stubs/TroubleshootingGuide.tsx | 2 +- .../troubleshooting/GuideEndScreen.tsx | 63 ------------------- 3 files changed, 5 insertions(+), 66 deletions(-) delete mode 100644 desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx diff --git a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx index b5e95a036..e8297db95 100644 --- a/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/AppSelector.tsx @@ -29,7 +29,8 @@ import BaseDevice, {OS} from '../../server/devices/BaseDevice'; import Client from '../../Client'; import {State} from '../../reducers'; 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; @@ -108,7 +109,8 @@ export function AppSelector() { ) : ( - + // GK check to decide if troubleshooting guide will be visible or not + ); } diff --git a/desktop/app/src/sandy-chrome/appinspect/fb-stubs/TroubleshootingGuide.tsx b/desktop/app/src/sandy-chrome/appinspect/fb-stubs/TroubleshootingGuide.tsx index f7e7ee642..0c624dd00 100644 --- a/desktop/app/src/sandy-chrome/appinspect/fb-stubs/TroubleshootingGuide.tsx +++ b/desktop/app/src/sandy-chrome/appinspect/fb-stubs/TroubleshootingGuide.tsx @@ -10,6 +10,6 @@ import React from 'react'; import {NoDevices} from '../NoDevices'; -export default function TroubleshootingGuide() { +export function TroubleshootingGuide(_props: {showGuide: boolean}) { return ; } diff --git a/desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx b/desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx deleted file mode 100644 index 9523e7273..000000000 --- a/desktop/app/src/sandy-chrome/appinspect/troubleshooting/GuideEndScreen.tsx +++ /dev/null @@ -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 ( - props.toggleModal(false)} - bodyStyle={{maxHeight: 800, overflow: 'auto'}}> - - - - - - - - - - - - ); -}