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

Reposition pattern detail icon #59363

Merged
merged 1 commit into from Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 20 additions & 20 deletions packages/edit-site/src/components/page-patterns/index.js
Expand Up @@ -210,6 +210,26 @@ function Title( { item, categoryId } ) {
}
return (
<HStack alignment="center" justify="flex-start" spacing={ 2 }>
<Flex
as="div"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not directly related to this PR, but I think this is unnecessary since the Flex component is rendered as a div element by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, let's fix it separately.

gap={ 0 }
justify="left"
className="edit-site-patterns__pattern-title"
>
{ item.type === PATTERN_TYPES.theme ? (
item.title
) : (
<Button
variant="link"
onClick={ onClick }
// Required for the grid's roving tab index system.
// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.
tabIndex="-1"
>
{ item.title || item.name }
</Button>
) }
</Flex>
{ itemIcon && ! isNonUserPattern && (
<Tooltip
placement="top"
Expand All @@ -235,26 +255,6 @@ function Title( { item, categoryId } ) {
/>
</Tooltip>
) }
<Flex
as="div"
gap={ 0 }
justify="left"
className="edit-site-patterns__pattern-title"
>
{ item.type === PATTERN_TYPES.theme ? (
item.title
) : (
<Button
variant="link"
onClick={ onClick }
// Required for the grid's roving tab index system.
// See https://github.com/WordPress/gutenberg/pull/51898#discussion_r1243399243.
tabIndex="-1"
>
{ item.title || item.name }
</Button>
) }
</Flex>
</HStack>
);
}
Expand Down