Move troubleshooting guide into a menu

Reviewed By: lblasa

Differential Revision: D47591882

fbshipit-source-id: 84e3732100aa20d5f78b132a4c429b9b742678e9
This commit is contained in:
Anton Kastritskiy
2023-07-20 03:54:19 -07:00
committed by Facebook GitHub Bot
parent 57d4c99e0f
commit 7195b35b12
2 changed files with 3 additions and 6 deletions

View File

@@ -70,6 +70,7 @@ import {
NavbarScreenshotButton, NavbarScreenshotButton,
} from '../chrome/ScreenCaptureButtons'; } from '../chrome/ScreenCaptureButtons';
import {StatusMessage} from './appinspect/AppInspect'; import {StatusMessage} from './appinspect/AppInspect';
import {TroubleshootingGuide} from './appinspect/fb-stubs/TroubleshootingGuide';
export const Navbar = withTrackingScope(function Navbar({ export const Navbar = withTrackingScope(function Navbar({
toplevelSelection, toplevelSelection,
@@ -509,6 +510,7 @@ function TroubleshootMenu({
Troubleshoot connectivity Troubleshoot connectivity
</Menu.Item> </Menu.Item>
)} )}
<TroubleshootingGuide />
<Menu.Item <Menu.Item
key="flipperlogs" key="flipperlogs"
onClick={() => setToplevelSelection('flipperlogs')}> onClick={() => setToplevelSelection('flipperlogs')}>

View File

@@ -29,7 +29,6 @@ import {BaseDevice} from 'flipper-frontend-core';
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 {getSelectableDevices} from '../../selectors/connections'; import {getSelectableDevices} from '../../selectors/connections';
import {getRenderHostInstance} from 'flipper-frontend-core'; import {getRenderHostInstance} from 'flipper-frontend-core';
import {NoDevices} from './NoDevices'; import {NoDevices} from './NoDevices';
@@ -139,11 +138,7 @@ export function AppSelector() {
)} )}
{ {
/* Return the public component NoDevices if showGuide is false (This means that the user is not in the GK Allowlist) and no devices are detected */ /* Return the public component NoDevices if showGuide is false (This means that the user is not in the GK Allowlist) and no devices are detected */
!gkSelfSufficiency && entries.length == 0 ? ( !gkSelfSufficiency && entries.length == 0 ? <NoDevices /> : null
<NoDevices />
) : !gkSelfSufficiency && entries.length > 0 ? null : (
<TroubleshootingGuide />
)
} }
</> </>
); );