Remove "can resize left pane" flags
This commit is contained in:
parent
a5a73e869c
commit
0a90380ac8
4 changed files with 13 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2020-2021 Signal Messenger, LLC
|
// Copyright 2020-2022 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import { get, throttle } from 'lodash';
|
import { get, throttle } from 'lodash';
|
||||||
|
@ -8,8 +8,6 @@ import * as log from './logging/log';
|
||||||
|
|
||||||
export type ConfigKeyType =
|
export type ConfigKeyType =
|
||||||
| 'desktop.announcementGroup'
|
| 'desktop.announcementGroup'
|
||||||
| 'desktop.canResizeLeftPane.beta'
|
|
||||||
| 'desktop.canResizeLeftPane.production'
|
|
||||||
| 'desktop.clientExpiration'
|
| 'desktop.clientExpiration'
|
||||||
| 'desktop.disableGV1'
|
| 'desktop.disableGV1'
|
||||||
| 'desktop.groupCallOutboundRing'
|
| 'desktop.groupCallOutboundRing'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2020-2021 Signal Messenger, LLC
|
// Copyright 2020-2022 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
@ -84,7 +84,6 @@ const emptySearchResultsGroup = { isLoading: false, results: [] };
|
||||||
|
|
||||||
const useProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
const useProps = (overrideProps: Partial<PropsType> = {}): PropsType => ({
|
||||||
cantAddContactToGroup: action('cantAddContactToGroup'),
|
cantAddContactToGroup: action('cantAddContactToGroup'),
|
||||||
canResizeLeftPane: true,
|
|
||||||
clearGroupCreationError: action('clearGroupCreationError'),
|
clearGroupCreationError: action('clearGroupCreationError'),
|
||||||
clearSearch: action('clearSearch'),
|
clearSearch: action('clearSearch'),
|
||||||
closeCantAddContactToGroupModal: action('closeCantAddContactToGroupModal'),
|
closeCantAddContactToGroupModal: action('closeCantAddContactToGroupModal'),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2019-2021 Signal Messenger, LLC
|
// Copyright 2019-2022 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import React, { useEffect, useCallback, useMemo, useState } from 'react';
|
import React, { useEffect, useCallback, useMemo, useState } from 'react';
|
||||||
|
@ -89,7 +89,6 @@ export type PropsType = {
|
||||||
selectedConversationId: undefined | string;
|
selectedConversationId: undefined | string;
|
||||||
selectedMessageId: undefined | string;
|
selectedMessageId: undefined | string;
|
||||||
regionCode: string;
|
regionCode: string;
|
||||||
canResizeLeftPane: boolean;
|
|
||||||
challengeStatus: 'idle' | 'required' | 'pending';
|
challengeStatus: 'idle' | 'required' | 'pending';
|
||||||
setChallengeStatus: (status: 'idle') => void;
|
setChallengeStatus: (status: 'idle') => void;
|
||||||
crashReportCount: number;
|
crashReportCount: number;
|
||||||
|
@ -150,7 +149,6 @@ export type PropsType = {
|
||||||
|
|
||||||
export const LeftPane: React.FC<PropsType> = ({
|
export const LeftPane: React.FC<PropsType> = ({
|
||||||
cantAddContactToGroup,
|
cantAddContactToGroup,
|
||||||
canResizeLeftPane,
|
|
||||||
challengeStatus,
|
challengeStatus,
|
||||||
crashReportCount,
|
crashReportCount,
|
||||||
clearGroupCreationError,
|
clearGroupCreationError,
|
||||||
|
@ -628,17 +626,15 @@ export const LeftPane: React.FC<PropsType> = ({
|
||||||
{footerContents && (
|
{footerContents && (
|
||||||
<div className="module-left-pane__footer">{footerContents}</div>
|
<div className="module-left-pane__footer">{footerContents}</div>
|
||||||
)}
|
)}
|
||||||
{canResizeLeftPane && (
|
<>
|
||||||
<>
|
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
|
||||||
{/* eslint-disable-next-line jsx-a11y/no-static-element-interactions */}
|
<div
|
||||||
<div
|
className="module-left-pane__resize-grab-area"
|
||||||
className="module-left-pane__resize-grab-area"
|
onMouseDown={() => {
|
||||||
onMouseDown={() => {
|
setIsResizing(true);
|
||||||
setIsResizing(true);
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{challengeStatus !== 'idle' &&
|
{challengeStatus !== 'idle' &&
|
||||||
renderCaptchaDialog({
|
renderCaptchaDialog({
|
||||||
onSkip() {
|
onSkip() {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2019-2021 Signal Messenger, LLC
|
// Copyright 2019-2022 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
@ -9,7 +9,6 @@ import type { PropsType as LeftPanePropsType } from '../../components/LeftPane';
|
||||||
import { LeftPane, LeftPaneMode } from '../../components/LeftPane';
|
import { LeftPane, LeftPaneMode } from '../../components/LeftPane';
|
||||||
import type { StateType } from '../reducer';
|
import type { StateType } from '../reducer';
|
||||||
import { missingCaseError } from '../../util/missingCaseError';
|
import { missingCaseError } from '../../util/missingCaseError';
|
||||||
import { isAlpha, isBeta } from '../../util/version';
|
|
||||||
|
|
||||||
import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums';
|
import { ComposerStep, OneTimeModalState } from '../ducks/conversationsEnums';
|
||||||
import {
|
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) => {
|
const mapStateToProps = (state: StateType) => {
|
||||||
return {
|
return {
|
||||||
modeSpecificProps: getModeSpecificProps(state),
|
modeSpecificProps: getModeSpecificProps(state),
|
||||||
canResizeLeftPane: canResizeLeftPane(),
|
|
||||||
preferredWidthFromStorage: getPreferredLeftPaneWidth(state),
|
preferredWidthFromStorage: getPreferredLeftPaneWidth(state),
|
||||||
selectedConversationId: getSelectedConversationId(state),
|
selectedConversationId: getSelectedConversationId(state),
|
||||||
selectedMessageId: getSelectedMessage(state)?.id,
|
selectedMessageId: getSelectedMessage(state)?.id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue