Skip to content

Commit

Permalink
Fix styling of actions in site editor navigation sidebar (#51153)
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras authored Jun 1, 2023
1 parent 52c9056 commit a88f3c2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export default function SidebarNavigationScreenGlobalStyles() {
) }
content={ <SidebarNavigationScreenGlobalStylesContent /> }
actions={
<div>
<>
{ ! isMobileViewport && (
<SidebarButton
icon={ seen }
Expand All @@ -138,7 +138,7 @@ export default function SidebarNavigationScreenGlobalStyles() {
label={ __( 'Edit styles' ) }
onClick={ async () => await openGlobalStyles() }
/>
</div>
</>
}
/>
{ isStyleBookOpened && ! isMobileViewport && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default function SidebarNavigationScreenPage() {
record?.title?.rendered || __( '(no title)' )
) }
actions={
<div>
<>
<PageActions
postId={ postId }
toggleProps={ { as: SidebarButton } }
Expand All @@ -92,7 +92,7 @@ export default function SidebarNavigationScreenPage() {
label={ __( 'Edit' ) }
icon={ pencil }
/>
</div>
</>
}
meta={
<ExternalLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function SidebarNavigationScreenTemplate() {
<SidebarNavigationScreen
title={ title }
actions={
<div>
<>
<TemplateActions
postType={ postType }
postId={ postId }
Expand All @@ -106,7 +106,7 @@ export default function SidebarNavigationScreenTemplate() {
label={ __( 'Edit' ) }
icon={ pencil }
/>
</div>
</>
}
description={ description }
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export default function SidebarNavigationScreen( {
title
) }
</Heading>
{ actions }
{ actions && (
<div className="edit-site-sidebar-navigation-screen__actions">
{ actions }
</div>
) }
</HStack>
{ meta && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
padding: $grid-unit-15 * 0.5 0 0 0;
}

.edit-site-sidebar-navigation-screen__actions {
flex-shrink: 0;
}

.edit-site-sidebar-navigation-screen__content .edit-site-global-styles-style-variations-container {
.edit-site-global-styles-variations_item-preview {
border: $gray-900 $border-width solid;
Expand Down

1 comment on commit a88f3c2

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in a88f3c2.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5142577310
📝 Reported issues:

Please sign in to comment.