Skip to content

Commit

Permalink
Template pattern modal: remove internal modal classnames (#50655)
Browse files Browse the repository at this point in the history
* Template pattern modal: remove internal modal classnames

* Update snapshots

* CHANGELOG
  • Loading branch information
ciampo authored May 16, 2023
1 parent 37dc9f6 commit 4556c86
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 36 deletions.
4 changes: 4 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Internal

- `Modal`: Remove children container's unused class name ([#50655](https://github.com/WordPress/gutenberg/pull/50655)).

## 24.0.0 (2023-05-10)

### Breaking Changes
Expand Down
7 changes: 1 addition & 6 deletions packages/components/src/modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,7 @@ function UnforwardedModal(
) }
</div>
) }
<div
ref={ childrenContainerRef }
className="components-modal__children-container"
>
{ children }
</div>
<div ref={ childrenContainerRef }>{ children }</div>
</div>
</div>
</StyleProvider>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ exports[`KeyboardShortcutHelpModal should match snapshot when the modal is activ
</svg>
</button>
</div>
<div
class="components-modal__children-container"
>
<div>
<section
class="edit-post-keyboard-shortcut-help-modal__section edit-post-keyboard-shortcut-help-modal__main-shortcuts"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
</svg>
</button>
</div>
<div
class="components-modal__children-container"
>
<div>
<div
class="interface-preferences__tabs"
>
Expand Down Expand Up @@ -725,9 +723,7 @@ exports[`EditPostPreferencesModal should match snapshot when the modal is active
</svg>
</button>
</div>
<div
class="components-modal__children-container"
>
<div>
<div
class="components-navigator-provider interface-preferences__provider emotion-0 emotion-1"
data-wp-c16t="true"
Expand Down
41 changes: 20 additions & 21 deletions packages/edit-site/src/components/start-template-options/style.scss
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
.edit-site-start-template-options__modal {
.components-modal__content {
padding-bottom: 0;
}
$actions-height: 92px;

.components-modal__children-container {
display: flex;
height: 100%;
flex-direction: column;

.edit-site-start-template-options__modal__actions {
margin-top: auto;
position: sticky;
bottom: 0;
background-color: $white;
margin-left: - $grid-unit-40;
margin-right: - $grid-unit-40;
padding: $grid-unit-30 $grid-unit-40 $grid-unit-40;
border-top: 1px solid $gray-300;
z-index: z-index(".edit-site-start-template-options__modal__actions");
}
.edit-site-start-template-options__modal {
.edit-site-start-template-options__modal__actions {
position: absolute;
bottom: 0;
width: 100%;
height: $actions-height;
background-color: $white;
margin-left: - $grid-unit-40;
margin-right: - $grid-unit-40;
padding-left: $grid-unit-40;
padding-right: $grid-unit-40;
border-top: 1px solid $gray-300;
z-index: z-index(".edit-site-start-template-options__modal__actions");
}

.block-editor-block-patterns-list {
padding-bottom: $grid-unit-40;
// Since the actions container is positioned absolutely,
// this padding bottom ensures that the content wrapper will properly
// detect overflowing content and start showing scrollbars at the right
// moment. Without this padding, the content would render under the actions
// bar without causing the wrapper to show a scrollbar.
padding-bottom: $actions-height;
}
}

Expand Down

0 comments on commit 4556c86

Please sign in to comment.