diff --git a/desktop/app/src/sandy-chrome/LeftRail.tsx b/desktop/app/src/sandy-chrome/LeftRail.tsx index 34d90d4c9..8221b54c6 100644 --- a/desktop/app/src/sandy-chrome/LeftRail.tsx +++ b/desktop/app/src/sandy-chrome/LeftRail.tsx @@ -24,6 +24,8 @@ import { import {SidebarLeft, SidebarRight} from './SandyIcons'; import {useDispatch, useStore} from '../utils/useStore'; import { + ACTIVE_SHEET_PLUGINS, + setActiveSheet, toggleLeftSidebarVisible, toggleRightSidebarVisible, } from '../reducers/application'; @@ -40,6 +42,10 @@ import config from '../fb-stubs/config'; import styled from '@emotion/styled'; import {showEmulatorLauncher} from './appinspect/LaunchEmulator'; import {useStore as useReduxStore} from 'react-redux'; +import SupportRequestFormV2 from '../fb-stubs/SupportRequestFormV2'; +import {setStaticView} from '../reducers/connections'; +import {getInstance} from '../fb-stubs/Logger'; +import {isStaticViewActive} from '../chrome/mainsidebar/sidebarUtils'; const LeftRailButtonElem = styled(Button)<{kind?: 'small'}>(({kind}) => ({ width: kind === 'small' ? 32 : 36, @@ -107,6 +113,7 @@ export function LeftRail({ toplevelSelection, setToplevelSelection, }: ToplevelProps) { + const dispatch = useDispatch(); return ( @@ -119,7 +126,13 @@ export function LeftRail({ setToplevelSelection('appinspect'); }} /> - } title="Plugin Manager" /> + } + title="Plugin Manager" + onClick={() => { + dispatch(setActiveSheet(ACTIVE_SHEET_PLUGINS)); + }} + /> - } - small - title="Feedback / Bug Reporter" - /> + {config.showLogin && } @@ -282,6 +291,27 @@ function ShowSettingsButton() { ); } +function SupportFormButton() { + const dispatch = useDispatch(); + const staticView = useStore((state) => state.connections.staticView); + // const isVisible = + return ( + } + small + title="Feedback / Bug Reporter" + selected={isStaticViewActive(staticView, SupportRequestFormV2)} + onClick={() => { + getInstance().track('usage', 'support-form-source', { + source: 'sidebar', + group: undefined, + }); + dispatch(setStaticView(SupportRequestFormV2)); + }} + /> + ); +} + function WelcomeScreenButton() { const settings = useStore((state) => state.settingsState); const {showWelcomeAtStartup} = settings;