-
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
Post Author block: Hide select author controle if there is no postId #40910
Post Author block: Hide select author controle if there is no postId #40910
Conversation
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.
@mauriac thank you for working on this. Changes works as expected. I don't see any select dropdown to change author in the block settings when postId doesn't exist.
thanks to handle this. |
) } | ||
{ !! postId && | ||
! isDescendentOfQueryLoop && | ||
!! authors?.length && ( |
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.
Do both !! postId
and ! isDescendentOfQueryLoop
need to be checked?
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.
I have removed the ! isDescendentOfQueryLoop and run some tests and everything seems to be fine. But are we sure that _ isDescendentOfQueryLoop_ will be false each time when _ postId_ will be defined? is there a way to confirm that? Thanks.
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.
Does postId get passed via context to author blocks in query loops when the query loop is in a post? if it does then we need to keep ! isDescendentOfQueryLoop
otherwise no.
If there is no postId the select, in post author block, that helps to change post author is hidden.
What?
fixes: #40909
Why?
How?
Testing Instructions
Screenshots or screencast