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
16 changes: 8 additions & 8 deletions packages/e2e-tests/specs/editor/various/datepicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function formatDatePickerValues(

async function getPublishingDate() {
return page.$eval(
'.edit-post-post-schedule__toggle',
'.editor-post-schedule__dialog-toggle',
( dateLabel ) => dateLabel.textContent
);
}
Expand All @@ -83,15 +83,15 @@ describe.each( [ [ 'UTC-10' ], [ 'UTC' ], [ 'UTC+10' ] ] )(

it( 'should show the publishing date if the date is in the past', async () => {
// Open the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

// Change the publishing date to a year in the past.
await page.click( '.components-datetime__time-field-year' );
await page.keyboard.press( 'ArrowDown' );
const datePickerValues = await getDatePickerValues();

// Close the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

const publishingDate = await getPublishingDate();

Expand All @@ -102,15 +102,15 @@ describe.each( [ [ 'UTC-10' ], [ 'UTC' ], [ 'UTC+10' ] ] )(

it( 'should show the publishing date if the date is in the future', async () => {
// Open the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

// Change the publishing date to a year in the future.
await page.click( '.components-datetime__time-field-year' );
await page.keyboard.press( 'ArrowUp' );
const datePickerValues = await getDatePickerValues();

// Close the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

const publishingDate = await getPublishingDate();

Expand All @@ -123,17 +123,17 @@ describe.each( [ [ 'UTC-10' ], [ 'UTC' ], [ 'UTC+10' ] ] )(

it( `should show the publishing date as "Immediately" if the date is cleared`, async () => {
// Open the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

// Change the publishing date to a year in the future.
await page.click( '.components-datetime__time-field-year' );
await page.keyboard.press( 'ArrowUp' );

// Close the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

// Open the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

// Clear the date.
await page.click(
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor/various/scheduling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe( 'Scheduling', () => {
await page.keyboard.press( 'ArrowUp' );

// Close the datepicker.
await page.click( '.edit-post-post-schedule__toggle' );
await page.click( '.editor-post-schedule__dialog-toggle' );

expect( await getPublishButtonText() ).toBe( 'Schedule…' );
} );
Expand Down
67 changes: 0 additions & 67 deletions packages/edit-post/src/components/sidebar/post-schedule/index.js

This file was deleted.

36 changes: 0 additions & 36 deletions packages/edit-post/src/components/sidebar/post-schedule/style.scss

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@wordpress/components';
import { useDispatch, useSelect } from '@wordpress/data';
import {
PostSchedulePanel,
PostSwitchToDraftButton,
PostSyncStatus,
PostURLPanel,
Expand All @@ -18,7 +19,6 @@ import {
*/
import PostVisibility from '../post-visibility';
import PostTrash from '../post-trash';
import PostSchedule from '../post-schedule';
import PostSticky from '../post-sticky';
import PostAuthor from '../post-author';
import PostSlug from '../post-slug';
Expand Down Expand Up @@ -61,7 +61,7 @@ export default function PostStatus() {
{ ( fills ) => (
<>
<PostVisibility />
<PostSchedule />
<PostSchedulePanel />
<PostTemplate />
<PostURLPanel />
<PostSticky />
Expand Down
1 change: 0 additions & 1 deletion packages/edit-post/src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
@import "./components/sidebar/last-revision/style.scss";
@import "./components/sidebar/post-author/style.scss";
@import "./components/sidebar/post-format/style.scss";
@import "./components/sidebar/post-schedule/style.scss";
@import "./components/sidebar/post-slug/style.scss";
@import "./components/sidebar/post-template/style.scss";
@import "./components/sidebar/post-visibility/style.scss";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
* WordPress dependencies
*/
import { __experimentalVStack as VStack } from '@wordpress/components';
import { PostURLPanel } from '@wordpress/editor';
import { PostURLPanel, PostSchedulePanel } from '@wordpress/editor';

/**
* Internal dependencies
*/
import PageStatus from './page-status';
import PublishDate from './publish-date';
import EditTemplate from './edit-template';

export default function PageSummary( {
Expand All @@ -27,12 +26,7 @@ export default function PageSummary( {
postId={ postId }
postType={ postType }
/>
<PublishDate
status={ status }
date={ date }
postId={ postId }
postType={ postType }
/>
<PostSchedulePanel />
<EditTemplate />
<PostURLPanel />
</VStack>
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions packages/editor/src/components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export {
default as PostScheduleLabel,
usePostScheduleLabel,
} from './post-schedule/label';
export { default as PostSchedulePanel } from './post-schedule/panel';
export { default as PostSlug } from './post-slug';
export { default as PostSlugCheck } from './post-slug/check';
export { default as PostSticky } from './post-sticky';
Expand Down
Loading