Skip to content

Commit

Permalink
Fix: Snack bar not fixed on certain pages in the Site Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Aug 1, 2023
1 parent 561d244 commit be09691
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
1 change: 1 addition & 0 deletions packages/base-styles/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ $z-layers: (
".edit-site-layout__hub": 3,
".edit-site-layout__header": 2,
".edit-site-page-header": 2,
".edit-site-page-content": 1,
".edit-site-patterns__header": 2,
".edit-site-patterns__grid-pagination": 2,
".edit-site-layout__canvas-container": 2,
Expand Down
8 changes: 0 additions & 8 deletions packages/edit-site/src/components/page-patterns/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
padding: 0;
overflow-x: auto;

.edit-site-page-content {
height: 100%;
position: relative;
padding: 0;
display: flex;
flex-flow: column;
}

.components-base-control {
width: 100%;
@include break-medium {
Expand Down
16 changes: 8 additions & 8 deletions packages/edit-site/src/components/page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ export default function Page( {

return (
<NavigableRegion className={ classes } ariaLabel={ title }>
{ ! hideTitleFromUI && title && (
<Header
title={ title }
subTitle={ subTitle }
actions={ actions }
/>
) }
<div className="edit-site-page-content">
{ ! hideTitleFromUI && title && (
<Header
title={ title }
subTitle={ subTitle }
actions={ actions }
/>
) }
{ children }
<EditorSnackbars />
</div>
<EditorSnackbars />
</NavigableRegion>
);
}
13 changes: 8 additions & 5 deletions packages/edit-site/src/components/page/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
color: $gray-800;
background: $white;
flex-grow: 1;
overflow: auto;
overflow: hidden;
margin: 0;
margin-top: $header-height;
@include break-medium() {
Expand All @@ -13,8 +13,7 @@

.edit-site-page-header {
padding: 0 $grid-unit-40;
height: $header-height;
padding-left: $grid-unit-40;
min-height: $header-height;
border-bottom: 1px solid $gray-100;
background: $white;
position: sticky;
Expand All @@ -33,6 +32,10 @@
}

.edit-site-page-content {
padding: $grid-unit-40 $grid-unit-40;
overflow-x: auto;
height: 100%;
display: flex;
overflow: auto;
flex-flow: column;
position: relative;
z-index: z-index(".edit-site-page-content");
}
1 change: 1 addition & 0 deletions packages/edit-site/src/components/table/style.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.edit-site-table-wrapper {
width: 100%;
padding: $grid-unit-40;
}

.edit-site-table {
Expand Down

0 comments on commit be09691

Please sign in to comment.