From f556965a3258811d08c6754a690629aa6f6bee4f Mon Sep 17 00:00:00 2001 From: Caleb Roseland Date: Mon, 16 Dec 2024 11:31:04 -0600 Subject: [PATCH] MM-62044: Always show title in create bookmark flow (#29476) --- .../channel/channel_bookmarks_spec.ts | 2 + .../channel_bookmarks_create_modal.tsx | 49 +++++++++---------- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/e2e-tests/cypress/tests/integration/channels/channel/channel_bookmarks_spec.ts b/e2e-tests/cypress/tests/integration/channels/channel/channel_bookmarks_spec.ts index d76c43823354..1148c1dfdbb0 100644 --- a/e2e-tests/cypress/tests/integration/channels/channel/channel_bookmarks_spec.ts +++ b/e2e-tests/cypress/tests/integration/channels/channel/channel_bookmarks_spec.ts @@ -265,6 +265,8 @@ function createLinkBookmark({ // # Enter link editTextInput('linkInput', link); + cy.wait(TIMEOUTS.HALF_SEC); + if (displayName) { // # Enter displayname editTextInput('titleInput', displayName); diff --git a/webapp/channels/src/components/channel_bookmarks/channel_bookmarks_create_modal.tsx b/webapp/channels/src/components/channel_bookmarks/channel_bookmarks_create_modal.tsx index 4260e87a2f47..559a51844bd4 100644 --- a/webapp/channels/src/components/channel_bookmarks/channel_bookmarks_create_modal.tsx +++ b/webapp/channels/src/components/channel_bookmarks/channel_bookmarks_create_modal.tsx @@ -292,7 +292,6 @@ function ChannelBookmarkCreateModal({ return undefined; })(); - const showControls = type === 'file' || (isValid || bookmark); const cancel = useCallback(() => { if (type === 'file') { @@ -375,8 +374,8 @@ function ChannelBookmarkCreateModal({ className='channel-bookmarks-create-modal' modalHeaderText={formatMessage(bookmark ? msg.editHeading : msg.heading)} confirmButtonText={formatMessage(bookmark ? msg.saveText : msg.addBookmarkText)} - handleCancel={(showControls && cancel) || undefined} - handleConfirm={(showControls && confirm) || undefined} + handleCancel={cancel} + handleConfirm={confirm} handleEnterKeyPress={(!confirmDisabled && confirm) || undefined} onExited={handleOnExited} compassDesign={true} @@ -452,30 +451,28 @@ function ChannelBookmarkCreateModal({ )} - {showControls && ( - - - - - + + - - )} + + + );