-
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
Add block variations' keywords search support #24040
Conversation
1ab4b27
to
f47c28d
Compare
Size Change: +38 B (0%) Total Size: 1.15 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.
Left a minor comment, but this is looking good.
accumulator.add( title ); | ||
keywords.forEach( ( keyword ) => | ||
accumulator.add( keyword ) | ||
); |
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.
Do you think the code here will be simpler if use arrays instead of Set?
return [ ...accumulator, title, ...keywords ]
(and not more Arrary.from)
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.
Yes it would but variations can have same keywords and will be added to the array duplicates. This became to me really obvious with embed
sharing many common keywords.
Nice one. |
Description
This PR adds search support for
Block variations'
keywords. Lays some groundwork for the refactoring ofEmbed
block to have all other embeds asBlock variations
.Related to #22660.
How has this been tested?
To easily test it manually you can edit an existent not
isDefault
variation by adding somekeywords
and test the inserter by searching your terms. Be aware to allow the variation to be searchable for your manual testing. For example incolumns
all variations have scope'block
, that means you have to either comment it or addinserter
inscope
array.Columns' variations in master.
Checklist: