Remove "can resize left pane" flags

This commit is contained in:
Evan Hahn 2022-01-12 11:35:47 -06:00 committed by GitHub
parent a5a73e869c
commit 0a90380ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 31 deletions

View File

@ -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'

View File

@ -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> = {}): PropsType => ({
cantAddContactToGroup: action('cantAddContactToGroup'),
canResizeLeftPane: true,
clearGroupCreationError: action('clearGroupCreationError'),
clearSearch: action('clearSearch'),
closeCantAddContactToGroupModal: action('closeCantAddContactToGroupModal'),

View File

@ -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<PropsType> = ({
cantAddContactToGroup,
canResizeLeftPane,
challengeStatus,
crashReportCount,
clearGroupCreationError,
@ -628,17 +626,15 @@ export const LeftPane: React.FC<PropsType> = ({
{footerContents && (
<div className="module-left-pane__footer">{footerContents}</div>
)}
{canResizeLeftPane && (
<>
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
<div
className="module-left-pane__resize-grab-area"
onMouseDown={() => {
setIsResizing(true);
}}
/>
</>
)}
<>
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
<div
className="module-left-pane__resize-grab-area"
onMouseDown={() => {
setIsResizing(true);
}}
/>
</>
{challengeStatus !== 'idle' &&
renderCaptchaDialog({
onSkip() {

View File

@ -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,