diff --git a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js index a1b44c5856..6048a32c1e 100644 --- a/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/accessibility/accessibility_account_settings_spec.js @@ -60,10 +60,6 @@ describe('Verify Accessibility Support in different sections in Settings and Pro {key: 'advancedCtrlSend', label: `Send Messages on ${isMac() ? '⌘+ENTER' : 'CTRL+ENTER'}`, type: 'radio'}, {key: 'formatting', label: 'Enable Post Formatting', type: 'radio'}, {key: 'joinLeave', label: 'Enable Join/Leave Messages', type: 'radio'}, - - // As only setting in advancedPreviewFeatures was related to editor preview this isn't required at the moment, - // may later on we can add it if we add more settings inside it - // {key: 'advancedPreviewFeatures', label: 'Preview Pre-release Features', type: 'checkbox'}, ], }; let url; diff --git a/e2e-tests/cypress/tests/integration/channels/messaging/markdown_preview_inline_image_spec.js b/e2e-tests/cypress/tests/integration/channels/messaging/markdown_preview_inline_image_spec.js index 5fe98f1062..a74996dc2c 100644 --- a/e2e-tests/cypress/tests/integration/channels/messaging/markdown_preview_inline_image_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/messaging/markdown_preview_inline_image_spec.js @@ -14,7 +14,6 @@ describe('Messaging', () => { before(() => { // # Login as test user and visit off-topic cy.apiInitSetup({loginAfter: true}).then(({offTopicUrl}) => { - cy.apiSaveShowMarkdownPreviewPreference(); cy.visit(offTopicUrl); cy.postMessage('hello'); }); diff --git a/e2e-tests/cypress/tests/integration/channels/messaging/message_spec.js b/e2e-tests/cypress/tests/integration/channels/messaging/message_spec.js index 2625a46a48..72f5151f51 100644 --- a/e2e-tests/cypress/tests/integration/channels/messaging/message_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/messaging/message_spec.js @@ -143,8 +143,6 @@ describe('Message', () => { }); it('MM-T3307 Focus remains in the RHS text box', () => { - cy.apiSaveShowMarkdownPreviewPreference(); - cy.postMessage(MESSAGES.MEDIUM); // # Open reply thread (RHS) diff --git a/e2e-tests/cypress/tests/support/api/cloud_default_config.json b/e2e-tests/cypress/tests/support/api/cloud_default_config.json index ad4fc60edf..5478fd7bc9 100644 --- a/e2e-tests/cypress/tests/support/api/cloud_default_config.json +++ b/e2e-tests/cypress/tests/support/api/cloud_default_config.json @@ -72,7 +72,6 @@ "EnableUserStatuses": true, "ExperimentalEnableAuthenticationTransfer": true, "ClusterLogTimeoutMilliseconds": 2000, - "EnablePreviewFeatures": true, "EnableTutorial": true, "EnableOnboardingFlow": false, "ExperimentalEnableDefaultChannelLeaveJoinMessages": true, diff --git a/e2e-tests/cypress/tests/support/api/on_prem_default_config.json b/e2e-tests/cypress/tests/support/api/on_prem_default_config.json index 6d38f90781..804ae3c14d 100644 --- a/e2e-tests/cypress/tests/support/api/on_prem_default_config.json +++ b/e2e-tests/cypress/tests/support/api/on_prem_default_config.json @@ -73,7 +73,6 @@ "EnableUserStatuses": true, "ExperimentalEnableAuthenticationTransfer": true, "ClusterLogTimeoutMilliseconds": 2000, - "EnablePreviewFeatures": true, "EnableTutorial": true, "EnableOnboardingFlow": false, "ExperimentalEnableDefaultChannelLeaveJoinMessages": true, diff --git a/e2e-tests/cypress/tests/support/api/preference.js b/e2e-tests/cypress/tests/support/api/preference.js index f13aebcfeb..f3f4ae0fca 100644 --- a/e2e-tests/cypress/tests/support/api/preference.js +++ b/e2e-tests/cypress/tests/support/api/preference.js @@ -76,24 +76,6 @@ Cypress.Commands.add('apiSaveMessageDisplayPreference', (value = 'clean') => { }); }); -/** - * Saves show markdown preview option preference of a user directly via API - * This API assume that the user is logged in and has cookie to access - * @param {String} value - Either "true" to show the options (default) or "false" - */ -Cypress.Commands.add('apiSaveShowMarkdownPreviewPreference', (value = 'true') => { - return cy.getCookie('MMUSERID').then((cookie) => { - const preference = { - user_id: cookie.value, - category: 'advanced_settings', - name: 'feature_enabled_markdown_preview', - value, - }; - - return cy.apiSaveUserPreference([preference]); - }); -}); - /** * Saves teammate name display preference of a user directly via API * This API assume that the user is logged in and has cookie to access diff --git a/e2e-tests/playwright/support/server/default_config.ts b/e2e-tests/playwright/support/server/default_config.ts index ea4cd5b066..dd496eb9a2 100644 --- a/e2e-tests/playwright/support/server/default_config.ts +++ b/e2e-tests/playwright/support/server/default_config.ts @@ -159,7 +159,6 @@ const defaultServerConfig: AdminConfig = { EnableUserStatuses: true, ExperimentalEnableAuthenticationTransfer: true, ClusterLogTimeoutMilliseconds: 2000, - EnablePreviewFeatures: true, EnableTutorial: true, EnableOnboardingFlow: true, ExperimentalEnableDefaultChannelLeaveJoinMessages: true, diff --git a/server/config/client.go b/server/config/client.go index 23a9793c63..d3090a2f70 100644 --- a/server/config/client.go +++ b/server/config/client.go @@ -41,7 +41,6 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li props["EnableClientPerformanceDebugging"] = strconv.FormatBool(*c.ServiceSettings.EnableClientPerformanceDebugging) props["PostEditTimeLimit"] = strconv.Itoa(*c.ServiceSettings.PostEditTimeLimit) props["MinimumHashtagLength"] = strconv.Itoa(*c.ServiceSettings.MinimumHashtagLength) - props["EnablePreviewFeatures"] = strconv.FormatBool(*c.ServiceSettings.EnablePreviewFeatures) props["EnableTutorial"] = strconv.FormatBool(*c.ServiceSettings.EnableTutorial) props["EnableOnboardingFlow"] = strconv.FormatBool(*c.ServiceSettings.EnableOnboardingFlow) props["ExperimentalEnableDefaultChannelLeaveJoinMessages"] = strconv.FormatBool(*c.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages) diff --git a/server/platform/services/telemetry/telemetry.go b/server/platform/services/telemetry/telemetry.go index 424a57f3cd..d349322b17 100644 --- a/server/platform/services/telemetry/telemetry.go +++ b/server/platform/services/telemetry/telemetry.go @@ -456,7 +456,6 @@ func (ts *TelemetryService) trackConfig() { "enable_post_search": *cfg.ServiceSettings.EnablePostSearch, "minimum_hashtag_length": *cfg.ServiceSettings.MinimumHashtagLength, "enable_user_statuses": *cfg.ServiceSettings.EnableUserStatuses, - "enable_preview_features": *cfg.ServiceSettings.EnablePreviewFeatures, "enable_tutorial": *cfg.ServiceSettings.EnableTutorial, "enable_onboarding_flow": *cfg.ServiceSettings.EnableOnboardingFlow, "experimental_enable_default_channel_leave_join_messages": *cfg.ServiceSettings.ExperimentalEnableDefaultChannelLeaveJoinMessages, diff --git a/server/public/model/config.go b/server/public/model/config.go index d416ff5657..876b8a38d7 100644 --- a/server/public/model/config.go +++ b/server/public/model/config.go @@ -374,7 +374,6 @@ type ServiceSettings struct { EnableUserStatuses *bool `access:"write_restrictable,cloud_restrictable"` ExperimentalEnableAuthenticationTransfer *bool `access:"experimental_features"` ClusterLogTimeoutMilliseconds *int `access:"write_restrictable,cloud_restrictable"` - EnablePreviewFeatures *bool `access:"experimental_features"` EnableTutorial *bool `access:"experimental_features"` EnableOnboardingFlow *bool `access:"experimental_features"` ExperimentalEnableDefaultChannelLeaveJoinMessages *bool `access:"experimental_features"` @@ -775,10 +774,6 @@ func (s *ServiceSettings) SetDefaults(isUpdate bool) { s.PostEditTimeLimit = NewInt(-1) } - if s.EnablePreviewFeatures == nil { - s.EnablePreviewFeatures = NewBool(true) - } - if s.ExperimentalEnableDefaultChannelLeaveJoinMessages == nil { s.ExperimentalEnableDefaultChannelLeaveJoinMessages = NewBool(true) } diff --git a/server/tests/test-config.json b/server/tests/test-config.json index 6973610114..ca27301807 100644 --- a/server/tests/test-config.json +++ b/server/tests/test-config.json @@ -54,7 +54,6 @@ "EnableUserStatuses": true, "ExperimentalEnableAuthenticationTransfer": true, "ClusterLogTimeoutMilliseconds": 2000, - "EnablePreviewFeatures": true, "EnableTutorial": true, "EnableOnboardingFlow": true, "ExperimentalEnableDefaultChannelLeaveJoinMessages": true, diff --git a/webapp/channels/src/components/admin_console/admin_definition.tsx b/webapp/channels/src/components/admin_console/admin_definition.tsx index bd7773b9f2..ddbbcdcce2 100644 --- a/webapp/channels/src/components/admin_console/admin_definition.tsx +++ b/webapp/channels/src/components/admin_console/admin_definition.tsx @@ -6054,14 +6054,6 @@ const AdminDefinition: AdminDefinitionType = { help_text_markdown: false, isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)), }, - { - type: 'bool', - key: 'ServiceSettings.EnablePreviewFeatures', - label: defineMessage({id: 'admin.experimental.enablePreviewFeatures.title', defaultMessage: 'Enable Preview Features:'}), - help_text: defineMessage({id: 'admin.experimental.enablePreviewFeatures.desc', defaultMessage: 'When true, preview features can be enabled from **Settings > Advanced > Preview pre-release features**. When false, disables and hides preview features from **Settings > Advanced > Preview pre-release features**.'}), - help_text_markdown: true, - isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)), - }, { type: 'bool', key: 'ThemeSettings.EnableThemeSelection', diff --git a/webapp/channels/src/components/user_settings/advanced/index.ts b/webapp/channels/src/components/user_settings/advanced/index.ts index 516fcb01d2..6a523c556a 100644 --- a/webapp/channels/src/components/user_settings/advanced/index.ts +++ b/webapp/channels/src/components/user_settings/advanced/index.ts @@ -1,6 +1,7 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. +import type {ConnectedProps} from 'react-redux'; import {connect} from 'react-redux'; import {bindActionCreators} from 'redux'; import type {Dispatch} from 'redux'; @@ -20,8 +21,8 @@ import {Preferences} from 'utils/constants'; import type {GlobalState} from 'types/store'; -import type {OwnProps} from './user_settings_advanced'; import AdvancedSettingsDisplay from './user_settings_advanced'; +import type {OwnProps} from './user_settings_advanced'; function makeMapStateToProps(state: GlobalState, props: OwnProps) { const getAdvancedSettingsCategory = props.adminMode ? makeGetUserCategory(props.user.id) : makeGetCategory(); @@ -29,7 +30,6 @@ function makeMapStateToProps(state: GlobalState, props: OwnProps) { return (state: GlobalState, props: OwnProps) => { const config = getConfig(state); - const enablePreviewFeatures = config.EnablePreviewFeatures === 'true'; const enableUserDeactivation = config.EnableUserDeactivation === 'true'; const enableJoinLeaveMessage = config.EnableJoinLeaveMessageByDefault === 'true'; @@ -44,7 +44,6 @@ function makeMapStateToProps(state: GlobalState, props: OwnProps) { syncDrafts: get(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'sync_drafts', 'true', userPreferences), user: props.adminMode && props.user ? props.user : getCurrentUser(state), unreadScrollPosition: getUnreadScrollPositionPreference(state, userPreferences), - enablePreviewFeatures, enableUserDeactivation, syncedDraftsAreAllowed: syncedDraftsAreAllowed(state), }; @@ -61,4 +60,8 @@ function mapDispatchToProps(dispatch: Dispatch) { }; } -export default connect(makeMapStateToProps, mapDispatchToProps)(AdvancedSettingsDisplay); +const connector = connect(makeMapStateToProps, mapDispatchToProps); + +export type PropsFromRedux = ConnectedProps; + +export default connector(AdvancedSettingsDisplay); diff --git a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.test.tsx b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.test.tsx index 4c4fcc3362..cbdf641d38 100644 --- a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.test.tsx +++ b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.test.tsx @@ -44,7 +44,6 @@ describe('components/user_settings/display/UserSettingsDisplay', () => { syncDrafts: '', unreadScrollPosition: Preferences.UNREAD_SCROLL_POSITION_START_FROM_LEFT, codeBlockOnCtrlEnter: 'false', - enablePreviewFeatures: false, enableUserDeactivation: false, syncedDraftsAreAllowed: true, }; diff --git a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx index 50e5be4903..ec293e60b8 100644 --- a/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx +++ b/webapp/channels/src/components/user_settings/advanced/user_settings_advanced.tsx @@ -10,8 +10,6 @@ import {FormattedMessage, defineMessages} from 'react-intl'; import type {PreferencesType, PreferenceType} from '@mattermost/types/preferences'; import type {UserProfile} from '@mattermost/types/users'; -import type {ActionResult} from 'mattermost-redux/types/actions'; - import {emitUserLoggedOutEvent} from 'actions/global_actions'; import ConfirmModal from 'components/confirm_modal'; @@ -20,7 +18,7 @@ import SettingItemMax from 'components/setting_item_max'; import Constants, {AdvancedSections, Preferences} from 'utils/constants'; import {isMac} from 'utils/user_agent'; -import {a11yFocus, localizeMessage} from 'utils/utils'; +import {a11yFocus} from 'utils/utils'; import JoinLeaveSection from './join_leave_section'; import PerformanceDebuggingSection from './performance_debugging_section'; @@ -28,8 +26,7 @@ import PerformanceDebuggingSection from './performance_debugging_section'; import SettingDesktopHeader from '../headers/setting_desktop_header'; import SettingMobileHeader from '../headers/setting_mobile_header'; -type PreReleaseFeaturesType = Record; -const PreReleaseFeatures: PreReleaseFeaturesType = Constants.PRE_RELEASE_FEATURES; +import type {PropsFromRedux} from './index'; type Settings = { [key: string]: string | undefined; @@ -44,39 +41,19 @@ export type OwnProps = { adminMode?: boolean; user: UserProfile; userPreferences?: PreferencesType; -} - -export type Props = OwnProps & { - advancedSettingsCategory: PreferenceType[]; - sendOnCtrlEnter: string; - codeBlockOnCtrlEnter: string; - formatting: string; - joinLeave: string; - unreadScrollPosition: string; - syncDrafts: string; updateSection: (section?: string) => void; activeSection: string; closeModal: () => void; collapseModal: () => void; - enablePreviewFeatures: boolean; - enableUserDeactivation: boolean; - syncedDraftsAreAllowed: boolean; - actions: { - savePreferences: (userId: string, preferences: PreferenceType[]) => Promise; - updateUserActive: (userId: string, active: boolean) => Promise; - revokeAllSessionsForUser: (userId: string) => Promise; - }; -}; +} + +export type Props = OwnProps & PropsFromRedux; type State = { - preReleaseFeatures: PreReleaseFeaturesType; settings: Settings; - enabledFeatures: number; isSaving: boolean; - previewFeaturesEnabled: boolean; showDeactivateAccountModal: boolean; serverError: string; - preReleaseFeaturesKeys: string[]; } export default class AdvancedSettingsDisplay extends React.PureComponent { @@ -87,7 +64,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { - const advancedSettings = this.props.advancedSettingsCategory; const settings: Settings = { send_on_ctrl_enter: this.props.sendOnCtrlEnter, code_block_ctrl_enter: this.props.codeBlockOnCtrlEnter, @@ -97,36 +73,13 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { - const {settings} = this.state; - settings[Constants.FeatureTogglePrefix + feature] = String(checked); - - let enabledFeatures = 0; - Object.keys(this.state.settings).forEach((setting) => { - if (setting.lastIndexOf(Constants.FeatureTogglePrefix) === 0 && this.state.settings[setting] === 'true') { - enabledFeatures++; - } - }); - - this.setState({settings, enabledFeatures}); - }; - - saveEnabledFeatures = (): void => { - const features: string[] = []; - Object.keys(this.state.settings).forEach((setting) => { - if (setting.lastIndexOf(Constants.FeatureTogglePrefix) === 0) { - features.push(setting); - } - }); - - this.handleSubmit(features); - }; - handleSubmit = async (settings: string[]): Promise => { if (!this.props.user) { return; @@ -585,20 +513,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent - ); - default: - return null; - } - } - renderCtrlSendSection = () => { const active = this.props.activeSection === 'advancedCtrlSend'; const serverError = this.state.serverError || null; @@ -710,79 +624,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { - const serverError = this.state.serverError || null; - const active = this.props.activeSection === 'advancedPreviewFeatures'; - let max = null; - if (active) { - const inputs = []; - - this.state.preReleaseFeaturesKeys.forEach((key) => { - const feature = this.state.preReleaseFeatures[key as keyof PreReleaseFeaturesType]; - inputs.push( -
-
- -
-
, - ); - }); - - inputs.push( -
-
- -
, - ); - - max = ( - - } - inputs={inputs} - submit={this.saveEnabledFeatures} - saving={this.state.isSaving} - serverError={serverError} - updateSection={this.handleUpdateSection} - /> - ); - } - return ( - - } - section={'advancedPreviewFeatures'} - updateSection={this.handleUpdateSection} - max={max} - /> - ); - }; - render() { const ctrlSendSection = this.renderCtrlSendSection(); @@ -792,15 +633,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent; } - let previewFeaturesSection; - let previewFeaturesSectionDivider; - if (this.state.previewFeaturesEnabled && this.state.preReleaseFeaturesKeys.length > 0) { - previewFeaturesSectionDivider = ( -
- ); - previewFeaturesSection = this.renderPreviewFeaturesSection(); - } - let deactivateAccountSection: ReactNode = ''; let makeConfirmationModal: ReactNode = ''; @@ -940,8 +772,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent - {previewFeaturesSectionDivider} - {previewFeaturesSection} Advanced > Preview pre-release features**. When false, disables and hides preview features from **Settings > Advanced > Preview pre-release features**.", - "admin.experimental.enablePreviewFeatures.title": "Enable Preview Features:", "admin.experimental.enableSharedChannels.desc": "When true, users who have permission to manage shared channels can configure another Mattermost server to synchronize and share a channel. Disabling shared channels stops synchronizing the channel with the other Mattermost server, however the channel continues to function for local users per normal channel behavior.", "admin.experimental.enableSharedChannels.title": "Enable Shared Channels:", "admin.experimental.enableThemeSelection.desc": "Enables the **Display > Theme** tab in Settings so users can select their theme.", @@ -5317,13 +5315,11 @@ "user.settings.advance.deactivateAccountTitle": "Deactivate Account", "user.settings.advance.deactivateDesc": "Deactivating your account removes your ability to log in to this server and disables all email and mobile notifications. To reactivate your account, contact your System Administrator.", "user.settings.advance.deactivateDescShort": "Click 'Edit' to deactivate your account", - "user.settings.advance.enabledFeatures": "{count, number} {count, plural, one {feature} other {features}} enabled", "user.settings.advance.formattingDesc": "If enabled, posts will be formatted to create links, show emoji, style the text, and add line breaks. By default, this setting is enabled.", "user.settings.advance.formattingTitle": "Enable Post Formatting", "user.settings.advance.icon": "Advanced Settings Icon", "user.settings.advance.joinLeaveDesc": "When \"On\", System Messages saying a user has joined or left a channel will be visible. When \"Off\", the System Messages about joining or leaving a channel will be hidden. A message will still show up when you are added to a channel, so you can receive a notification.", "user.settings.advance.joinLeaveTitle": "Enable Join/Leave Messages", - "user.settings.advance.markdown_preview": "Show markdown preview option in message input box", "user.settings.advance.off": "Off", "user.settings.advance.on": "On", "user.settings.advance.onForAllMessages": "On for all messages", @@ -5336,8 +5332,6 @@ "user.settings.advance.performance.noneEnabled": "No settings enabled", "user.settings.advance.performance.settingsEnabled": "{count, number} {count, plural, one {setting} other {settings}} enabled", "user.settings.advance.performance.title": "Performance Debugging", - "user.settings.advance.preReleaseDesc": "Check any pre-released features you'd like to preview. You may also need to refresh the page before the setting will take effect.", - "user.settings.advance.preReleaseTitle": "Preview Pre-release Features", "user.settings.advance.sendDesc": "When enabled, CTRL + ENTER will send the message and ENTER inserts a new line.", "user.settings.advance.sendDesc.mac": "When enabled, ⌘ + ENTER will send the message and ENTER inserts a new line.", "user.settings.advance.sendTitle": "Send Messages on CTRL+ENTER", diff --git a/webapp/channels/src/utils/constants.tsx b/webapp/channels/src/utils/constants.tsx index f8c1ea29bb..1b16a08c0b 100644 --- a/webapp/channels/src/utils/constants.tsx +++ b/webapp/channels/src/utils/constants.tsx @@ -1025,7 +1025,6 @@ export const AdvancedSections = { CONTROL_SEND: 'advancedCtrlSend', FORMATTING: 'formatting', JOIN_LEAVE: 'joinLeave', - PREVIEW_FEATURES: 'advancedPreviewFeatures', PERFORMANCE_DEBUGGING: 'performanceDebugging', SYNC_DRAFTS: 'syncDrafts', }; @@ -1980,8 +1979,6 @@ export const Constants = { COMMAND_SUGGESTION_CHANNEL: 'channel', COMMAND_SUGGESTION_USER: 'user', }, - FeatureTogglePrefix: 'feature_enabled_', - PRE_RELEASE_FEATURES: {}, OVERLAY_TIME_DELAY_SMALL: 100, OVERLAY_TIME_DELAY: 400, OVERLAY_DEFAULT_TRIGGER: ['hover', 'focus'], diff --git a/webapp/channels/src/utils/utils.tsx b/webapp/channels/src/utils/utils.tsx index 27dd6fcb44..89ca72c036 100644 --- a/webapp/channels/src/utils/utils.tsx +++ b/webapp/channels/src/utils/utils.tsx @@ -35,7 +35,7 @@ import { getMyChannelMemberships, } from 'mattermost-redux/selectors/entities/channels'; import {getPost} from 'mattermost-redux/selectors/entities/posts'; -import {getBool, getTeammateNameDisplaySetting, isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences'; +import {getTeammateNameDisplaySetting, isCollapsedThreadsEnabled} from 'mattermost-redux/selectors/entities/preferences'; import type {Theme} from 'mattermost-redux/selectors/entities/preferences'; import { getTeamByName, @@ -1123,11 +1123,6 @@ export function getUserIdFromChannelId(channelId: Channel['id'], currentUserId = return otherUserId; } -// Should be refactored, seems to make most sense to wrap TextboxLinks in a connect(). To discuss -export function isFeatureEnabled(feature: {label: string}, state: GlobalState) { - return getBool(state, Constants.Preferences.CATEGORY_ADVANCED_SETTINGS, Constants.FeatureTogglePrefix + feature.label); -} - export function fillRecord(value: T, length: number): Record { const arr: Record = {}; diff --git a/webapp/platform/types/src/config.ts b/webapp/platform/types/src/config.ts index b31dd48087..f843f23720 100644 --- a/webapp/platform/types/src/config.ts +++ b/webapp/platform/types/src/config.ts @@ -87,7 +87,6 @@ export type ClientConfig = { EnableOutgoingWebhooks: string; EnablePostIconOverride: string; EnablePostUsernameOverride: string; - EnablePreviewFeatures: string; EnablePreviewModeBanner: string; EnablePublicLink: string; EnableReliableWebSockets: string; @@ -357,7 +356,6 @@ export type ServiceSettings = { EnableUserStatuses: boolean; ExperimentalEnableAuthenticationTransfer: boolean; ClusterLogTimeoutMilliseconds: number; - EnablePreviewFeatures: boolean; EnableTutorial: boolean; EnableOnboardingFlow: boolean; ExperimentalEnableDefaultChannelLeaveJoinMessages: boolean;