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

Fix multi entities saved state in the post editor #47734

Merged
merged 4 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ import type { Editor } from './index';
*/
export async function publishPost( this: Editor ) {
await this.page.click( 'role=button[name="Publish"i]' );
const publishEditorPanel = this.page.locator(
'role=region[name="Editor publish"i]'
const entitiesSaveButton = this.page.locator(
'role=region[name="Editor publish"i] >> role=button[name="Save"i]'
);

const isPublishEditorVisible = await publishEditorPanel.isVisible();
const isEntitiesSavePanelVisible = await entitiesSaveButton.isVisible();

// Save any entities.
if ( isPublishEditorVisible ) {
if ( isEntitiesSavePanelVisible ) {
// Handle saving entities.
await this.page.click(
kevin940726 marked this conversation as resolved.
Show resolved Hide resolved
'role=region[name="Editor publish"i] >> role=button[name="Save"i]'
Expand Down
4 changes: 4 additions & 0 deletions packages/edit-post/src/components/layout/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,7 @@
bottom: 0;
}
}

.edit-post-layout .entities-saved-states__panel-header {
height: $header-height + $border-width;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
}

.entities-saved-states__panel-header {
box-sizing: border-box;
background: $white;
padding-left: $grid-unit-10;
padding-right: $grid-unit-10;
Expand Down
18 changes: 16 additions & 2 deletions packages/interface/src/components/interface-skeleton/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,26 @@ html.interface-interface-skeleton__html-container {
bottom: auto;
left: auto;
right: 0;
width: $sidebar-width;
color: $gray-900;
background: $white;
width: 100vw;

@include break-medium() {
width: $sidebar-width;
}

&:focus,
&:focus-within {
top: auto;
top: $admin-bar-height-big;

@include break-medium() {
border-left: $border-width solid $gray-300;
top: $admin-bar-height;

.is-fullscreen-mode & {
top: 0;
}
}
bottom: 0;
}
}