Navigation Link UI: Remove onClose from onSelectBlock#67760
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. |
|
Size Change: -23 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 88a8892. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12769914997
|
1e62a4d to
ba071eb
Compare
|
@Mamaduka - Rebased! |
onSelectBlock was being called after from the QuickInserter even if the link ui had already been closed. This results in some weird states due to the function containing old states. There have been updates to this flow around closing the link ui since the code was originally written, and the onClose should be handled by the popover already.
ba071eb to
88a8892
Compare
onSelectBlock was being called after from the QuickInserter even if the link ui had already been closed. This results in some weird states due to the function containing old states. There have been updates to this flow around closing the link ui since the code was originally written, and the onClose should be handled by the popover already. Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: darnado <darnado@git.wordpress.org>
onSelectBlock was being called after from the QuickInserter even if the link ui had already been closed. This results in some weird states due to the function containing old states. There have been updates to this flow around closing the link ui since the code was originally written, and the onClose should be handled by the popover already. Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: darnado <darnado@git.wordpress.org>
What?
Fixes a bug where the
onClosefrom the NavigationLinkUipopover was being called after theLinkUIwas already closed.Why?
Fixes #67712
How?
Remove
onSelectBlockfrom theQuickInsertereven if theLinkUIhad already been closed. There have been updates to this flow around closing theLinkUIsince the code was originally written, and theonCloseshould be handled by the popover already.Testing Instructions
Steps taken from @darnado's in #67712
In general, test inserting blocks from both the navigation link ui inserter and from clicking "Browse all" and inserting blocks into the navigation block.
Testing Instructions for Keyboard
Screenshots or screencast