-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Try/publish in site editor #51408
Try/publish in site editor #51408
Conversation
Size Change: +1.4 kB (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
Flaky tests detected in 2a13222. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5317296705
|
@jameskoster I updated PR to use modal initially just triggered via page inspector. One bit of jank is that it doesn't "save" the status change until a user hits save . We could save but would need to prompt to save other details before. Have a play and see what you think. |
Nice. I don't actually mind the jank, at least it's consistent with the post editor / other meta changes. We might need to include the calendar for all statuses except Draft and Pending, otherwise you cannot update the publish date. |
eb424b2
to
0d25392
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left some suggestions but most of them are not blocking and can be improved in future PRs 👍 . Just jotting them down here to keep track of them in case I forget 😝 .
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
packages/edit-site/src/components/sidebar-navigation-screen-page/style.scss
Outdated
Show resolved
Hide resolved
// Anchor the popover to the middle of the entire row so that it doesn't | ||
// move around when the label changes. | ||
anchor: popoverAnchor, | ||
placement: 'bottom-end', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The popover doesn't have a descriptive name for screen readers, users might not even know that they land in a popover. Maybe we should add aria-label
or aria-labelledby
here.
The other thing is that Popover
traps the focus but it doesn't set the dialog
role. This could be a bigger problem in general of the component design and I personally think it's an accessibility bug. We could set a role: 'dialog'
here but I'm not sure if it's the right move. Possibly better to consult an accessibility expert on this.
It's still usable thought just a bit confusing so I don't think this should be blocking 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an aria-label
for the time being since I don't want to modify InspectorPopoverHeader
or PublishDateTimePicker
as part of this PR to add ID to title.
The other thing is that Popover traps the focus but it doesn't set the dialog role. This could be a bigger problem in general of the component design and I personally think it's an accessibility bug. We could set a role: 'dialog' here but I'm not sure if it's the right move. Possibly better to consult an accessibility expert on this.
Let's create a separate issue referencing the Dropdown and Popover components in wordpress/components to review any accessibility concerns. Modal has a title
prop that uses aria-labelledby
.
@kevin940726 Thanks for the review! I'll fix up your suggestions first thing tomorrow and hopefully we can get this merged later in the day :) |
@kevin940726 ready for a re-review please! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me locally. Just a small suggestion left! None of the issues mentioned above should be blocking so I'm approving this 👍
packages/edit-site/src/components/sidebar-edit-mode/page-panels/page-status.js
Outdated
Show resolved
Hide resolved
* add required inputs * schedule date * add password and fix a few things * re-add status modal * update change status modal * revert in sidebar status change * refine a few status details * fix merge issues * fix status label * use null for status date * handle empty date * change to add fields instead of modal * default publish not draft * remove style import * add required inputs * schedule date * add password and fix a few things * re-add status modal * update change status modal * revert in sidebar status change * refine a few status details * fix merge issues * fix status label * use null for status date * handle empty date * change to add fields instead of modal * default publish not draft * remove style import * remove css * only autofocus password field if empty * aria label on status popover * remove end line * create radio with help component * adjust to use radiocontrol and hide password * radio label alignment * add form wrapper * aria label
What?
Adds ability to set status, publish date and password in site editor.
Why?
Resolves #49873
How?
WIP.
Testing Instructions
pages
and select a page to editTesting Instructions for Keyboard
Screenshots or screencast