-
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
[Widgets screen] Fix categorization not showing in the global inserter #28036
[Widgets screen] Fix categorization not showing in the global inserter #28036
Conversation
Size Change: +1.11 kB (0%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
@kevin940726 Before reviewing, I'd like to have some understanding of what the cause of this is. Why does this problem happen with the widget area block and not other blocks? |
@talldan Sure thing! Sorry I didn't make it clear in the description. It's because |
@kevin940726 The curious thing is that I don't see the same issue with other blocks like Group, Cover that are container blocks. Looking at the code it seems to be because another block has its That block is the legacy widget: gutenberg/packages/edit-widgets/src/blocks/legacy-widget/block.json Lines 29 to 31 in 6b8bf91
Legacy widget setting widget area as its parent shouldn't mean it's exclusive to the widget area, there can still be other blocks as children. I remember #23231 changed how that works. My conclusion is that this |
Ohh I didn't know that! I'll have to take a deeper look into this later. |
Removing this check seems to have no effect other than fixing the widgets editor. What should I test? With blocks installed via plugins the categories and collections displayed just fine. |
Yeah, seems like we can safely remove it? I can add some e2e tests to both the post editor and the widgets editor. |
90c0dba
to
82d25b6
Compare
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 like you fixed something via removal of something else, best fix. Ha ha
Description
Fix #26159 and #26329.
Removed the now outdated check of
hasChildItems
.How has this been tested?
Screenshots
Types of changes
Bug fix
Checklist: