Skip to content
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 API: Allow overriding the category for block variations #28482

Merged
merged 3 commits into from
Jan 26, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove obsolete getVariations call that was disconnected in #25182
  • Loading branch information
gziolo committed Jan 26, 2021
commit f51c381598b3d60f55371f01782e7af736ae3fd2
13 changes: 0 additions & 13 deletions packages/block-editor/src/components/inserter/search-items.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,6 @@ export const searchBlockItems = (
find( categories, { slug: item.category } )?.title,
getCollection: ( item ) =>
collections[ item.name.split( '/' )[ 0 ] ]?.title,
getVariations: ( { variations = [] } ) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer referenced in the code as of #25182.

Array.from(
variations.reduce(
( accumulator, { title, keywords = [] } ) => {
accumulator.add( title );
keywords.forEach( ( keyword ) =>
accumulator.add( keyword )
);
return accumulator;
},
new Set()
)
),
};

return searchItems( items, searchInput, config );
Expand Down