Skip to content

Fix: QuickEdit: consolidate how "Status > Scheduled" works #76129

Merged
oandregal merged 4 commits intoWordPress:trunkfrom
hbhalodia:fix/issue-76103
Mar 6, 2026
Merged

Fix: QuickEdit: consolidate how "Status > Scheduled" works #76129
oandregal merged 4 commits intoWordPress:trunkfrom
hbhalodia:fix/issue-76103

Conversation

@hbhalodia
Copy link
Copy Markdown
Contributor

@hbhalodia hbhalodia commented Mar 4, 2026

What?

Closes #76103

Why?

  • Need to show the date field, when status in quick edit data form changes to scheduled or future.

How?

  • PR adds the new field called scheduledDateField, which is being rendered only when status is future.

Testing Instructions

  1. Open site editor.
  2. View pages in table dataviews.
  3. Click on quick edit.
  4. Click on status and change status to scheduled.
  5. You will notice that we have date selection same as we have in post editor.

Testing Instructions for Keyboard

  • None

Screenshots or screencast

Screen.Recording.2026-03-06.at.2.54.16.PM.mov

@hbhalodia hbhalodia requested review from Copilot and oandregal March 4, 2026 09:17
@github-actions github-actions bot added [Package] Editor /packages/editor [Package] Edit Site /packages/edit-site [Package] Fields /packages/fields labels Mar 4, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 4, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
Co-authored-by: oandregal <oandregal@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Gutenberg issue #76103 by making the Quick Edit experience consistent with the editor inspector: when a post’s status is changed to Scheduled (future) in Quick Edit, a date/time control becomes available so users can immediately set the scheduled publish date.

Changes:

  • Added a new scheduledDateField to the @wordpress/fields package, visible only when status === 'future'.
  • Implemented a custom edit control using the block-editor’s PrivatePublishDateTimePicker.
  • Wired the new field into the editor dataviews schema and the Edit Site Quick Edit modal layout.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/fields/src/fields/index.ts Exports the new scheduledDateField from @wordpress/fields.
packages/fields/src/fields/date/scheduled/index.tsx Defines the new field (scheduled_date) with visibility tied to scheduled status.
packages/fields/src/fields/date/scheduled/edit.tsx Adds the date/time picker edit UI for scheduled posts.
packages/fields/README.md Updates autogenerated API docs to include scheduledDateField.
packages/editor/src/dataviews/store/private-actions.ts Registers scheduledDateField in the post-type schema fields list.
packages/edit-site/src/components/post-list/quick-edit-modal.js Adds scheduled_date into the Quick Edit form under Status.
Comments suppressed due to low confidence (1)

packages/fields/src/fields/date/scheduled/index.tsx:25

  • The doc comment reads "ScheduledDate Field." which is inconsistent with the other field docs in this package (they typically use sentence case and mention the entity type, e.g. "Date field for BasePost."). Updating this comment will also improve the autogenerated API docs in packages/fields/README.md.
/**
 * ScheduledDate Field.
 */
export default scheduledDateField;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

type: 'datetime',
label: __( 'Scheduled Date' ),
getValue: ( { item } ) => item.date,
Edit: ScheduledDateEdit,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It'd be best that the existing date field and this one use the same Edit component. Meaning that we don't need this custom Edit, we can just reuse the bundled one.

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.

Hi @oandregal, Thanks for the suggestion. I initially tend to use the same one, datetime on the new scheduled_date field, but the thing is it does not match with the exact post editor screen that we are intend to.

If we need to match the funcationality then datetime will work, but if need to match exact same consistency to post editor screen, customEdit would be the thing to go.

For now, not updating the PR with bundled theme, will wait for the way to go.

See the below screenshots,

With bundled datetime With custom Edit Post Editor screen
Screenshot 2026-03-06 at 11 06 32 AM Screenshot 2026-03-06 at 11 08 09 AM Screenshot 2026-03-06 at 11 09 54 AM

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's best to start with the bundle one, and iterate from there.

Then, in a follow-up PR, we may offer a compact variant of the datetime that only displays the datetime-local input, not the calendar via configuration. Essentially, we'd support something along these lines:

Edit: {
  isCompact: true
}

and the result would be that only the datetime-local component is displayed.

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.

That makes sense @oandregal, Thanks for the review. I will update the PR shortly with the change and use the bundled one instead of custom edit for now.

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.

Hi @oandregal, The above is now updated. Used the bundled datetime component for both date and scheduled date field.

Copy link
Copy Markdown
Contributor Author

@hbhalodia hbhalodia Mar 6, 2026

Choose a reason for hiding this comment

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

I do have created a followup issue to track the same - #76234

@oandregal oandregal added the [Type] Enhancement A suggestion for improvement. label Mar 5, 2026
@oandregal oandregal merged commit 1652348 into WordPress:trunk Mar 6, 2026
42 of 44 checks passed
@github-actions github-actions bot added this to the Gutenberg 22.8 milestone Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Edit Site /packages/edit-site [Package] Editor /packages/editor [Package] Fields /packages/fields [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QuickEdit: consolidate how "Status > Scheduled" works

3 participants