Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Tooltip workarounds added in the site and block editor #54450

Merged
merged 2 commits into from
Sep 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ import { __ } from '@wordpress/i18n';
export default function LinkedButton( { isLinked, ...props } ) {
const label = isLinked ? __( 'Unlink radii' ) : __( 'Link radii' );

// TODO: Remove span after merging https://github.com/WordPress/gutenberg/pull/44198
return (
<Tooltip text={ label }>
<span>
<Button
{ ...props }
className="component-border-radius-control__linked-button"
isSmall
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
/>
</span>
<Button
{ ...props }
className="component-border-radius-control__linked-button"
isSmall
icon={ isLinked ? link : linkOff }
iconSize={ 24 }
aria-label={ label }
/>
</Tooltip>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,7 @@ function ListViewBlockSelectButton(
) }
{ positionLabel && isSticky && (
<Tooltip text={ positionLabel }>
<span className="block-editor-list-view-block-select-button__sticky">
<Icon icon={ pinSmall } />
</span>
<Icon icon={ pinSmall } />
</Tooltip>
) }
{ images.length ? (
Expand Down
3 changes: 1 addition & 2 deletions packages/block-editor/src/components/list-view/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@
background: rgba($black, 0.3);
}

.block-editor-list-view-block-select-button__lock,
.block-editor-list-view-block-select-button__sticky {
.block-editor-list-view-block-select-button__lock {
line-height: 0;
}

Expand Down
18 changes: 9 additions & 9 deletions packages/edit-site/src/components/page-patterns/grid-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,10 @@ function GridItem( { categoryId, item, ...props } ) {
'Editing this pattern will also update anywhere it is used'
) }
>
<span>
<Icon
className="edit-site-patterns__pattern-icon"
icon={ itemIcon }
/>
</span>
<Icon
className="edit-site-patterns__pattern-icon"
icon={ itemIcon }
/>
</Tooltip>
) }
<Flex as="span" gap={ 0 } justify="left">
Expand All @@ -213,9 +211,11 @@ function GridItem( { categoryId, item, ...props } ) {
position="top center"
text={ __( 'This pattern cannot be edited.' ) }
>
<span className="edit-site-patterns__pattern-lock-icon">
<Icon icon={ lockSmall } size={ 24 } />
</span>
<Icon
className="edit-site-patterns__pattern-lock-icon"
icon={ lockSmall }
size={ 24 }
/>
</Tooltip>
) }
</Flex>
Expand Down
6 changes: 1 addition & 5 deletions packages/edit-site/src/components/page-patterns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,7 @@
}

.edit-site-patterns__pattern-lock-icon {
display: inline-flex;

svg {
fill: currentcolor;
}
fill: currentcolor;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,3 @@
margin-right: $grid-unit-10;
}

.edit-site-sidebar-navigation-screen-pattern__lock-icon {
display: inline-flex;
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ function ThemePatternsGroup( { categories, currentCategory, currentType } ) {
category.label
) }
>
<span className="edit-site-sidebar-navigation-screen-pattern__lock-icon">
<Icon icon={ lockSmall } size={ 24 } />
</span>
<Icon icon={ lockSmall } size={ 24 } />
</Tooltip>
</Flex>
}
Expand Down
Loading