-
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
Query Loop block: remove 'add new post' prompt in the sidebar #67189
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. |
I haven’t deleted the |
Just tested! Works for me. |
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 for the PR! If we get the consensus to remove this in the issue, we only need to remove CreateNewPostLink
component in this PR and it will be ready to land.
@@ -191,11 +186,6 @@ export default function QueryInspectorControls( props ) { | |||
|
|||
return ( | |||
<> | |||
{ !! postType && ( | |||
<BlockInfo> | |||
<CreateNewPostLink postType={ postType } /> |
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.
as I believe removing it would require proper documentation or mentioning it in the changelog.
We also need to remove this component. It's only used in Query Loop and not exported separately. No need to update anything else, like changelog or doc.
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 for the PR!
In addition to the CreateNewPostLink
component, we should be able to remove this style as well.
Another question is whether or not to remove the BlockInfo
private slot itself. This slot was introduced in #49819 but is not used except in the Query Loop block.
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 for the PR @dhruvang21 and the ping @t-hamano 👍
I'm definitely on board with removing not only the link but the component and private SlotFill as well.
#49819 was to maintain the existing UI when the block inspector tabs were introduced but it should also provide a loose guide on what needs to removed. As others have noted, this includes:
- CSS styles for the create new post link
CreateNewPostLink
componentBlockInfo
private SlotFill, its use, and private APIs export
The createPrivateSlotFill
util was also recently removed.
@dhruvang21 let's also remove the |
Can you rebase because of the conflicts? In order to properly remove the
|
44a833e
to
784395e
Compare
Thank you for guiding me! I’ve rebased the branch and resolved the conflict. Please have a look. |
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.
Looks good, thank you!
Fixes:- #67177
What?
This PR removes the "Add New Post" link in the Query Loop block's description.
Why?
The "Add New Post" link in the Query Loop block directs users to the post editor. While its intent is to guide users to create posts for an empty Query Loop block, it disrupts the user's workflow by taking them away from the editor. This leads to potential confusion as users may not know how to return and continue working on the Query Loop block. Removing the link ensures a more seamless experience.
How?
The link has been removed from the Query Loop block's description. This adjustment ensures that users are not redirected away from their current editing context.
Testing Instructions
Screenshots or screencast