Remove the gk
Summary: We have already rolled out `support_requests_v2` to 100% of FB employees. Thus removing the unneeded checks for the GK. Reviewed By: jknoxville Differential Revision: D19770930 fbshipit-source-id: 06fcf7b6b7c1305ab1b5b3c8df344e2877251e65
This commit is contained in:
committed by
Facebook Github Bot
parent
b9fafb0e61
commit
c52ca255bb
@@ -215,21 +215,19 @@ function getTemplate(
|
||||
submenu: exportSubmenu,
|
||||
},
|
||||
];
|
||||
if (GK.get('support_requests_v2')) {
|
||||
const supportRequestSubmenu = [
|
||||
{
|
||||
label: 'Create...',
|
||||
click: function() {
|
||||
// Dispatch an action to open the export screen of Support Request form
|
||||
store.dispatch(setStaticView(SupportRequestFormV2));
|
||||
},
|
||||
const supportRequestSubmenu = [
|
||||
{
|
||||
label: 'Create...',
|
||||
click: function() {
|
||||
// Dispatch an action to open the export screen of Support Request form
|
||||
store.dispatch(setStaticView(SupportRequestFormV2));
|
||||
},
|
||||
];
|
||||
fileSubmenu.push({
|
||||
label: 'Support Requests',
|
||||
submenu: supportRequestSubmenu,
|
||||
});
|
||||
}
|
||||
},
|
||||
];
|
||||
fileSubmenu.push({
|
||||
label: 'Support Requests',
|
||||
submenu: supportRequestSubmenu,
|
||||
});
|
||||
|
||||
const template: MenuItemConstructorOptions[] = [
|
||||
{
|
||||
|
||||
@@ -197,14 +197,12 @@ type DispatchFromProps = {
|
||||
|
||||
type Props = OwnProps & StateFromProps & DispatchFromProps;
|
||||
type State = {
|
||||
showSupportForm: boolean;
|
||||
showWatchDebugRoot: boolean;
|
||||
showAllPlugins: boolean;
|
||||
};
|
||||
|
||||
class MainSidebar2 extends PureComponent<Props, State> {
|
||||
state: State = {
|
||||
showSupportForm: GK.get('support_requests_v2'),
|
||||
showWatchDebugRoot: GK.get('watch_team_flipper_clientless_access'),
|
||||
showAllPlugins: false,
|
||||
};
|
||||
@@ -332,21 +330,20 @@ class MainSidebar2 extends PureComponent<Props, State> {
|
||||
{device.source ? 'Imported device' : 'Archived device'}
|
||||
</Info>
|
||||
</ListItem>
|
||||
{this.state.showSupportForm &&
|
||||
(device as ArchivedDevice).supportRequestDetails && (
|
||||
<ListItem
|
||||
active={supportRequestDetailsactive}
|
||||
onClick={() => setStaticView(SupportRequestDetails)}>
|
||||
<PluginIcon
|
||||
color={colors.light50}
|
||||
name={'app-dailies'}
|
||||
isActive={supportRequestDetailsactive}
|
||||
/>
|
||||
<PluginName isActive={supportRequestDetailsactive}>
|
||||
Support Request Details
|
||||
</PluginName>
|
||||
</ListItem>
|
||||
)}
|
||||
{(device as ArchivedDevice).supportRequestDetails && (
|
||||
<ListItem
|
||||
active={supportRequestDetailsactive}
|
||||
onClick={() => setStaticView(SupportRequestDetails)}>
|
||||
<PluginIcon
|
||||
color={colors.light50}
|
||||
name={'app-dailies'}
|
||||
isActive={supportRequestDetailsactive}
|
||||
/>
|
||||
<PluginName isActive={supportRequestDetailsactive}>
|
||||
Support Request Details
|
||||
</PluginName>
|
||||
</ListItem>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -52,13 +52,6 @@ function MainSidebarUtilsSection({
|
||||
}: Props) {
|
||||
const showWatchDebugRoot = GK.get('watch_team_flipper_clientless_access');
|
||||
|
||||
const hasSeenSupportForm = useRef(false);
|
||||
const showSupportForm =
|
||||
GK.get('support_requests_v2') || hasSeenSupportForm.current;
|
||||
if (showSupportForm) {
|
||||
hasSeenSupportForm.current = true;
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{flexShrink: 0, borderTop: `1px solid ${colors.blackAlpha10}`}}>
|
||||
{showWatchDebugRoot &&
|
||||
@@ -81,30 +74,29 @@ function MainSidebarUtilsSection({
|
||||
);
|
||||
})()}
|
||||
<RenderNotificationsEntry />
|
||||
{showSupportForm &&
|
||||
(function() {
|
||||
const active = isStaticViewActive(staticView, SupportRequestFormV2);
|
||||
return (
|
||||
<ListItem
|
||||
active={active}
|
||||
onClick={() => {
|
||||
getInstance().track('usage', 'support-form-source', {
|
||||
source: 'sidebar',
|
||||
group: selectedGroup.name,
|
||||
});
|
||||
setStaticView(SupportRequestFormV2);
|
||||
}}>
|
||||
<PluginIcon
|
||||
color={colors.light50}
|
||||
name={'app-dailies'}
|
||||
isActive={active}
|
||||
/>
|
||||
<PluginName isActive={active}>
|
||||
Litho/GraphQL Support Request
|
||||
</PluginName>
|
||||
</ListItem>
|
||||
);
|
||||
})()}
|
||||
{(function() {
|
||||
const active = isStaticViewActive(staticView, SupportRequestFormV2);
|
||||
return (
|
||||
<ListItem
|
||||
active={active}
|
||||
onClick={() => {
|
||||
getInstance().track('usage', 'support-form-source', {
|
||||
source: 'sidebar',
|
||||
group: selectedGroup.name,
|
||||
});
|
||||
setStaticView(SupportRequestFormV2);
|
||||
}}>
|
||||
<PluginIcon
|
||||
color={colors.light50}
|
||||
name={'app-dailies'}
|
||||
isActive={active}
|
||||
/>
|
||||
<PluginName isActive={active}>
|
||||
Litho/GraphQL Support Request
|
||||
</PluginName>
|
||||
</ListItem>
|
||||
);
|
||||
})()}
|
||||
<ListItem onClick={() => setActiveSheet(ACTIVE_SHEET_PLUGINS)}>
|
||||
<PluginIcon
|
||||
name="question-circle"
|
||||
|
||||
Reference in New Issue
Block a user