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
Block Directory: Explicitly close the inserter on block add. #24709
Block Directory: Explicitly close the inserter on block add. #24709
Conversation
Size Change: +19 B (0%) Total Size: 1.16 MB
ℹ️ View Unchanged
|
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.
Working as expected in my testing — I also pulled in the change from #24610 and that test passes now too. Maybe it should be combined with this PR? (those other test failures would still be an issue)
👍 for merging this as-is if you'd rather keep the test PR separate though
I would like to keep that separate as the changes in #24610 have wider implications and I don't want to tie up this functionality with those updates. This PR adds an immediate fix for #24606. |
Description
This PR explicitly closes the
Inserter
after a block is successfully installed from the Block Directory.Ideally, we would want the default inserter behaviour to determine whether the inserter should close or not. At the moment of this PR, the inserter closes when a block is added.
However, it appears like the async calls that are triggered when a user clicks "Install" on a block directory block do not trigger the same code paths/timings as regular blocks.
In order to solve #24606, there appear to be 2 choices:
onClose
function that closes the inserter.How has this been tested?
Drawbacks
As mentioned above if the main inserter goes back to not closing on block add, this will fall out of sync.
Types of changes
setIsInserterOpened
and close the inserterChecklist: