Skip to content

Commit

Permalink
Reinstate original logic to hide settings when not required
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jul 27, 2023
1 parent 8c0d692 commit facd271
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,7 @@ function LinkControl( {

const isEditing = ( isEditingLink || ! value ) && ! isCreatingPage;
const isDisabled = ! valueHasChanges || currentInputIsEmpty;

const shouldShowAdvancedSettings = ! currentInputIsEmpty && isEditingLink;
const showSettings = !! settings?.length && isEditingLink && hasLinkValue;

return (
<div
Expand Down Expand Up @@ -409,8 +408,8 @@ function LinkControl( {
/>
) }

<div className="block-editor-link-control__tools">
{ shouldShowAdvancedSettings && (
{ showSettings && (
<div className="block-editor-link-control__tools">
<LinkControlSettingsDrawer
settingsOpen={ isSettingsOpen }
setSettingsOpen={ setSettingsOpenWithPreference }
Expand All @@ -423,8 +422,8 @@ function LinkControl( {
) }
/>
</LinkControlSettingsDrawer>
) }
</div>
</div>
) }

{ showActions && (
<div className="block-editor-link-control__search-actions">
Expand Down

0 comments on commit facd271

Please sign in to comment.