diff --git a/webapp/channels/src/components/edit_channel_header_modal/__snapshots__/edit_channel_header_modal.test.tsx.snap b/webapp/channels/src/components/edit_channel_header_modal/__snapshots__/edit_channel_header_modal.test.tsx.snap index a60f353a39..617d24e61b 100644 --- a/webapp/channels/src/components/edit_channel_header_modal/__snapshots__/edit_channel_header_modal.test.tsx.snap +++ b/webapp/channels/src/components/edit_channel_header_modal/__snapshots__/edit_channel_header_modal.test.tsx.snap @@ -84,7 +84,6 @@ exports[`components/EditChannelHeaderModal edit direct message channel 1`] = ` {
0 : false} diff --git a/webapp/channels/src/components/edit_channel_header_modal/index.ts b/webapp/channels/src/components/edit_channel_header_modal/index.ts index 77c2617ebc..7eb1144be3 100644 --- a/webapp/channels/src/components/edit_channel_header_modal/index.ts +++ b/webapp/channels/src/components/edit_channel_header_modal/index.ts @@ -13,16 +13,12 @@ import {getBool} from 'mattermost-redux/selectors/entities/preferences'; import {setShowPreviewOnEditChannelHeaderModal} from 'actions/views/textbox'; import {showPreviewOnEditChannelHeaderModal} from 'selectors/views/textbox'; -import {Constants} from 'utils/constants'; -import {isFeatureEnabled} from 'utils/utils'; - import type {GlobalState} from 'types/store'; import EditChannelHeaderModal from './edit_channel_header_modal'; function mapStateToProps(state: GlobalState) { return { - markdownPreviewFeatureIsEnabled: isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.MARKDOWN_PREVIEW, state), shouldShowPreview: showPreviewOnEditChannelHeaderModal(state), ctrlSend: getBool(state, Preferences.CATEGORY_ADVANCED_SETTINGS, 'send_on_ctrl_enter'), }; diff --git a/webapp/channels/src/components/textbox/textbox_links.tsx b/webapp/channels/src/components/textbox/textbox_links.tsx index 03b6de0f22..9a8825e3fe 100644 --- a/webapp/channels/src/components/textbox/textbox_links.tsx +++ b/webapp/channels/src/components/textbox/textbox_links.tsx @@ -12,7 +12,6 @@ type Props = { previewMessageLink?: ReactNode; hasText?: boolean; hasExceededCharacterLimit?: boolean; - isMarkdownPreviewEnabled: boolean; updatePreview?: (showPreview: boolean) => void; }; @@ -21,7 +20,6 @@ function TextboxLinks({ previewMessageLink, hasText = false, hasExceededCharacterLimit = false, - isMarkdownPreviewEnabled, updatePreview, }: Props) { const togglePreview = (e: MouseEvent) => { @@ -48,25 +46,22 @@ function TextboxLinks({ ); } - let previewLink = null; - if (isMarkdownPreviewEnabled) { - previewLink = ( - - ); - } + const previewLink = ( + + ); const helpText = (
; +const PreReleaseFeatures: PreReleaseFeaturesType = Constants.PRE_RELEASE_FEATURES; type Settings = { [key: string]: string | undefined; @@ -63,7 +64,7 @@ export type Props = { }; type State = { - preReleaseFeatures: typeof PreReleaseFeatures; + preReleaseFeatures: PreReleaseFeaturesType; settings: Settings; enabledFeatures: number; isSaving: boolean; @@ -92,7 +93,6 @@ export default class AdvancedSettingsDisplay extends React.PureComponent { - const feature = this.state.preReleaseFeatures[key as keyof typeof PreReleaseFeatures]; + const feature = this.state.preReleaseFeatures[key as keyof PreReleaseFeaturesType]; inputs.push(
diff --git a/webapp/channels/src/utils/constants.tsx b/webapp/channels/src/utils/constants.tsx index 86858219f3..de1a641f5c 100644 --- a/webapp/channels/src/utils/constants.tsx +++ b/webapp/channels/src/utils/constants.tsx @@ -1971,12 +1971,7 @@ export const Constants = { COMMAND_SUGGESTION_USER: 'user', }, FeatureTogglePrefix: 'feature_enabled_', - PRE_RELEASE_FEATURES: { - MARKDOWN_PREVIEW: { - label: 'markdown_preview', // github issue: https://github.com/mattermost/platform/pull/1389 - description: 'Show markdown preview option in message input box', - }, - }, + PRE_RELEASE_FEATURES: {}, OVERLAY_TIME_DELAY_SMALL: 100, OVERLAY_TIME_DELAY: 400, OVERLAY_DEFAULT_TRIGGER: ['hover', 'focus'],