From 0a90380ac8253896481432553497e17497e37b91 Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Wed, 12 Jan 2022 11:35:47 -0600 Subject: [PATCH] Remove "can resize left pane" flags --- ts/RemoteConfig.ts | 4 +--- ts/components/LeftPane.stories.tsx | 3 +-- ts/components/LeftPane.tsx | 24 ++++++++++-------------- ts/state/smart/LeftPane.tsx | 13 +------------ 4 files changed, 13 insertions(+), 31 deletions(-) diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index 3c480e8c7b..01db26a505 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Signal Messenger, LLC +// Copyright 2020-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import { get, throttle } from 'lodash'; @@ -8,8 +8,6 @@ import * as log from './logging/log'; export type ConfigKeyType = | 'desktop.announcementGroup' - | 'desktop.canResizeLeftPane.beta' - | 'desktop.canResizeLeftPane.production' | 'desktop.clientExpiration' | 'desktop.disableGV1' | 'desktop.groupCallOutboundRing' diff --git a/ts/components/LeftPane.stories.tsx b/ts/components/LeftPane.stories.tsx index 977655f7e8..59714fcf0e 100644 --- a/ts/components/LeftPane.stories.tsx +++ b/ts/components/LeftPane.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Signal Messenger, LLC +// Copyright 2020-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import * as React from 'react'; @@ -84,7 +84,6 @@ const emptySearchResultsGroup = { isLoading: false, results: [] }; const useProps = (overrideProps: Partial = {}): PropsType => ({ cantAddContactToGroup: action('cantAddContactToGroup'), - canResizeLeftPane: true, clearGroupCreationError: action('clearGroupCreationError'), clearSearch: action('clearSearch'), closeCantAddContactToGroupModal: action('closeCantAddContactToGroupModal'), diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index 79f6b1ea9e..0ecb70f115 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -1,4 +1,4 @@ -// Copyright 2019-2021 Signal Messenger, LLC +// Copyright 2019-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React, { useEffect, useCallback, useMemo, useState } from 'react'; @@ -89,7 +89,6 @@ export type PropsType = { selectedConversationId: undefined | string; selectedMessageId: undefined | string; regionCode: string; - canResizeLeftPane: boolean; challengeStatus: 'idle' | 'required' | 'pending'; setChallengeStatus: (status: 'idle') => void; crashReportCount: number; @@ -150,7 +149,6 @@ export type PropsType = { export const LeftPane: React.FC = ({ cantAddContactToGroup, - canResizeLeftPane, challengeStatus, crashReportCount, clearGroupCreationError, @@ -628,17 +626,15 @@ export const LeftPane: React.FC = ({ {footerContents && (
{footerContents}
)} - {canResizeLeftPane && ( - <> - {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */} -
{ - setIsResizing(true); - }} - /> - - )} + <> + {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */} +
{ + setIsResizing(true); + }} + /> + {challengeStatus !== 'idle' && renderCaptchaDialog({ onSkip() { diff --git a/ts/state/smart/LeftPane.tsx b/ts/state/smart/LeftPane.tsx index 6af7e4fa05..b97a23857a 100644 --- a/ts/state/smart/LeftPane.tsx +++ b/ts/state/smart/LeftPane.tsx @@ -1,4 +1,4 @@ -// Copyright 2019-2021 Signal Messenger, LLC +// Copyright 2019-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -9,7 +9,6 @@ import type { PropsType as LeftPanePropsType } from '../../components/LeftPane'; import { LeftPane, LeftPaneMode } from '../../components/LeftPane'; import type { StateType } from '../reducer'; import { missingCaseError } from '../../util/missingCaseError'; -import { isAlpha, isBeta } from '../../util/version'; import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums'; import { @@ -168,19 +167,9 @@ const getModeSpecificProps = ( } }; -const canResizeLeftPane = () => - window.Signal.RemoteConfig.isEnabled('desktop.internalUser') || - isAlpha(window.getVersion()) || - isBeta(window.getVersion()) - ? window.Signal.RemoteConfig.isEnabled('desktop.canResizeLeftPane.beta') - : window.Signal.RemoteConfig.isEnabled( - 'desktop.canResizeLeftPane.production' - ); - const mapStateToProps = (state: StateType) => { return { modeSpecificProps: getModeSpecificProps(state), - canResizeLeftPane: canResizeLeftPane(), preferredWidthFromStorage: getPreferredLeftPaneWidth(state), selectedConversationId: getSelectedConversationId(state), selectedMessageId: getSelectedMessage(state)?.id,