Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
BlockEditor: refactoring getBlockParentsByBlockName() selector #20057
It re implements the getBlockParentsByBlockName() selector using the createSelector() function to memoize what t returns in order to avoid performance issues.
How has this been tested?
Create the following block structure
Visually, something like this:
or paste the following code in the Code Editor mode
When you inspect the nested Navigation Items, the colors should be propagated to all of them.
Also, you can check the behavior following the steps of this comment.
marekhrabe left a comment
I've tested this for regressions the same way I tested the previous implementation: I made a testing document to test this also outside the Navigation. Made Columns > Column > Cover > Paragraph and tried:
Still getting expected results for both manual testing and the integration in Navigation