-
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
Manual cherry pick for #65627 #66119
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. |
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 following up. This errors when activating Zoom Out. I think we're missing a PR that didn't get backported.
const { | ||
isZoomOut: isZoomOutSelector, | ||
getSectionRootClientId, | ||
getParentSectionBlock, |
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 think we're missing whatever PR included getParentSectionBlock
.
index.js:92 Uncaught TypeError: getParentSectionBlock is not a function
at index.js:92:6
at index.js:154:11
at __unstableMarkListeningStores (registry.js:123:20)
at Object.__unstableMarkListeningStores (registry.js:204:30)
at updateValue (index.js:153:31)
at index.js:203:3
at useMappingSelect (index.js:228:34)
at useSelect (index.js:317:5)
at BlockPopover (index.js:80:72)
at renderWithHooks (react-dom.js?ver=18:15496:20)
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.
ups! on it
@getdave I've brought over the missing selectors. It does not crash anymore and the build seems clean. |
Size Change: +239 B (+0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
@draganescu Thank you! Which PR was missing and should we just cherry-pick that too instead of patching it here? If it's a rabbit hole and can't be cherry-picked cleanly, do you think we should squash the commits (in this PR) so that when we "rebase and merge" this it can maintain a clean commit history? |
@kevin940726 the PR to cherry-pick is Select Mode: Use the content-only behavior in select mode ... not sure what to do with it. |
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 don't think we want all of #65204 backported. It's categorized as
[Type] Enhancement
What @draganescu copied over here is a much more minimal set of changes for the bug fix. The new selectors are private, so that shouldn't cause any issues.
I think the failing performance tests should be fixed after this pull request. It might require a rebase. |
* enable vertical toolbar for non full width elements, anchor based on parent * Update packages/block-editor/src/components/block-popover/index.js Co-authored-by: Dave Smith <getdavemail@gmail.com> * Update packages/block-editor/src/components/block-popover/index.js Co-authored-by: Dave Smith <getdavemail@gmail.com> * make zoom out check a dependency of the memoization, improve code readability * comment typos * subscribe to state instead of calculating zoom out view state when calculating the anchor * get the section wrapper for anchoring instead of the parent * use a selector instead of computing on the fly the parent section * check if the block element exists yet before computing the anchor * check if the block element exists yet before computing the anchor * differentiate between section toolbar and block toolbar for correct positioning when both are visible * address some nits * make the select in anchor setting rerun when block selection changes * fix bug with anchor rect when zoom out not engaged * fix typo * Use root container element in post editor as popover anchor * improve comment * improve comment to max improvement possible Co-authored-by: Dave Smith <getdavemail@gmail.com> * mega nit commit Co-authored-by: Dave Smith <getdavemail@gmail.com> * Fix bug with Posts with no full width blocks * give up on section root, always seek canvas element to position vertical toolbar, also fix typo * introduce the concept of canvas via a 1st variable * Use `__unstableContentRef` for zoomed out toolbar positioning instead of dom classname --------- Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org> Co-authored-by: talldan <talldanwp@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: jsnajdr <jsnajdr@git.wordpress.org> Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org> Co-authored-by: richtabor <richtabor@git.wordpress.org> Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
447e6b9
to
7cf8417
Compare
I just did the rebase. Will merge once tests pass. |
This is a manual cherry pick PR for #65627.