Skip to content
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
40 changes: 18 additions & 22 deletions packages/edit-site/src/components/post-list/quick-edit-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { DataForm } from '@wordpress/dataviews';
import {
Button,
Modal,
__experimentalVStack as VStack,
__experimentalHStack as HStack,
} from '@wordpress/components';
import { useEffect, useMemo, useState } from '@wordpress/element';
Expand Down Expand Up @@ -233,10 +232,7 @@ export function QuickEditModal( { postType, postId, closeModal } ) {
hideActions
/>
</div>
<VStack

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just removed the VStack here.

spacing={ 4 }
className="dataviews-action-modal__quick-edit-content"
>
<div className="dataviews-action-modal__quick-edit-content">
{ hasFinishedResolution && (
<DataForm
data={ { ...record, ...localEdits } }
Expand All @@ -245,23 +241,23 @@ export function QuickEditModal( { postType, postId, closeModal } ) {
onChange={ onChange }
/>
) }
<HStack className="dataviews-action-modal__quick-edit-footer">
<Button
__next40pxDefaultSize
variant="secondary"
onClick={ closeModal }
>
{ __( 'Cancel' ) }
</Button>
<Button
__next40pxDefaultSize
variant="primary"
onClick={ onSave }
>
{ __( 'Done' ) }
</Button>
</HStack>
</VStack>
</div>
<HStack className="dataviews-action-modal__quick-edit-footer">
<Button
__next40pxDefaultSize
variant="secondary"
onClick={ closeModal }
>
{ __( 'Cancel' ) }
</Button>
<Button
__next40pxDefaultSize
variant="primary"
onClick={ onSave }
>
{ __( 'Done' ) }
</Button>
</HStack>
</Modal>
);
}
36 changes: 26 additions & 10 deletions packages/edit-site/src/components/post-list/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
justify-content: flex-end;
align-items: stretch;

.dataviews-action-modal__quick-edit-header {
margin-bottom: $grid-unit-20;
}

.components-modal__frame {
margin: $grid-unit-20 $grid-unit-20 $grid-unit-20 0;
height: calc(100% - #{$grid-unit-20 * 2});
Expand All @@ -107,18 +103,38 @@
.components-modal__content {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
padding: 0;

> * {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
}

.dataviews-action-modal__quick-edit-header {
margin-bottom: $grid-unit-20;
padding: $grid-unit-30 $grid-unit-30 0;
}

.dataviews-action-modal__quick-edit-content {
flex-grow: 1;
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
overflow-y: auto;

.dataforms-layouts__wrapper {
flex: 1;
padding: 0 $grid-unit-30 $grid-unit-05; // Horizontal + bottom space for focus ring
}
}

.dataviews-action-modal__quick-edit-footer {
margin-top: auto;
padding-top: $grid-unit-20;
position: sticky;
bottom: 0;
flex-shrink: 0;
padding: $grid-unit-20 $grid-unit-30 $grid-unit-30;

.components-button {
flex: 1;
Expand Down
Loading