-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Editor: move around wordcount, post status and last edited info in page summary #61235
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -32,8 +33,12 @@ export default function PageSummary( { | |||
<PluginPostStatusInfo.Slot> | |||
{ ( fills ) => ( | |||
<> | |||
<PostFeaturedImagePanel withPanelBody={ false } /> | |||
<PrivatePostExcerptPanel /> | |||
<VStack spacing={ 2 }> |
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.
Styling in this Vstack should match this one: https://github.com/WordPress/gutenberg/pull/61235/files#diff-89b172fd62da4f8d2f19034e869e07494dffe29c7bcebf893ae1d4ddcbc2093bR85 for now.
Size Change: +233 B (+0.01%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
Can we have a before/after screenshot for this PR to understand its impact? |
} from '../../store/constants'; | ||
|
||
// Taken from packages/editor/src/components/time-to-read/index.js. | ||
const AVERAGE_READING_RATE = 189; |
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.
nitpick: Could we just export the constant from the other file, now that they are on the same package?
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.
Related: #60741.
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 changes worked as expected and I did not encounter any issues with the code.
Thanks for the review! I converted this to draft though because since the
The plan is to remove the details panel, so no need for updates there..
Will do after pushing some more changes. |
f35dc38
to
2df9c31
Compare
I updated the PR's description with before/after images and also moved the post status panel too. |
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, Nik!
I left minor notes, but the code changes look good to me and I couldn't spot any regression to the panels.
title: | ||
_templateInfo?.title || getEditedPostAttribute( 'title' ), |
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.
Nit: We can use _record?.title
here.
const { getEditedPostAttribute, getCurrentPostType, getCurrentPostId } = | ||
select( editorStore ); | ||
const { getEntityRecord } = select( coreStore ); | ||
const siteSettings = getEntityRecord( 'root', 'site' ); |
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.
Note: This will result in 403 requests for non-Admin users. I'm tracking this separately - #60987.
It only required a couple of lines of CSS, so I updated the 'Set featured image' button to match the design (based on other similar buttons in the Editor). @ntsekouras if you prefer to do that in a separate PR feel free to revert. |
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.
5d85c25
to
e8909af
Compare
Flaky tests detected in e8909af. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8919565688
|
What?
Part of: #59689
This PR moves around some components based on the updated designs shared here.
Notes
There will be a follow up for the PostExcerpt panel with the a11y concerns.
Testing Instructions
Page with no image and no excerpt
Post with image and excerpt