From b737d3263d2efbe2d00c12077946f3ddb8143e84 Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Tue, 23 Jul 2024 12:55:21 +0200 Subject: [PATCH] List View: remove tooltip around the "position: sticky" icon --- .../components/list-view/block-select-button.js | 16 +++------------- .../src/components/list-view/style.scss | 3 ++- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/packages/block-editor/src/components/list-view/block-select-button.js b/packages/block-editor/src/components/list-view/block-select-button.js index 605e22f226b25f..6755bb58e02569 100644 --- a/packages/block-editor/src/components/list-view/block-select-button.js +++ b/packages/block-editor/src/components/list-view/block-select-button.js @@ -10,12 +10,10 @@ import { Button, __experimentalHStack as HStack, __experimentalTruncate as Truncate, - Tooltip, } from '@wordpress/components'; import { forwardRef } from '@wordpress/element'; import { Icon, lockSmall as lock, pinSmall } from '@wordpress/icons'; import { SPACE, ENTER } from '@wordpress/keycodes'; -import { __, sprintf } from '@wordpress/i18n'; import { useSelect } from '@wordpress/data'; /** @@ -65,14 +63,6 @@ function ListViewBlockSelectButton( const isSticky = blockInformation?.positionType === 'sticky'; const images = useListViewImages( { clientId, isExpanded } ); - const positionLabel = blockInformation?.positionLabel - ? sprintf( - // translators: 1: Position of selected block, e.g. "Sticky" or "Fixed". - __( 'Position: %1$s' ), - blockInformation.positionLabel - ) - : ''; - // The `href` attribute triggers the browser's native HTML drag operations. // When the link is dragged, the element's outerHTML is set in DataTransfer object as text/html. // We need to clear any HTML drag data to prevent `pasteHandler` from firing @@ -136,10 +126,10 @@ function ListViewBlockSelectButton( ) } - { positionLabel && isSticky && ( - + { isSticky && ( + - + ) } { images.length ? (