-
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
Site Editor: tidy up the generation of the site editor page title #48053
Conversation
); | ||
const isReady = editedPostType !== undefined && editedPostId !== undefined; | ||
|
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.
This didn't seem to add anything over and above isLoaded
from useEditedEntityRecord
. In my testing editedPostType
and editedPostId
where always defined when isLoaded === true
, but I may have missed an edge case where this isn't the case.
Size Change: -83 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in fd52e8a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4168550632
|
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.
LGTM, thanks!
Thanks for the follow-up. This looks great. |
…8053) * Tidy up the generation of the edit site page title * Remove isReady as doesn't seem to add anything above the isLoaded from useEditedEntityRecord
Cherry-picked this PR to the wp/6.2 branch. |
What?
sprintf
instead of concatination for the generation of page title breadcrumbuseEditedEntityRecord
to get current edited post details instead of getting the post info via the useSelectWhy?
Changes were suggested in post merge follow up.
How?
As noted under
What?
aboveTesting Instructions
Screenshots or screencast
page-title-after.mp4