Skip to content

Commit

Permalink
Pattern Explorer: Pass 'rootClientId' to the pattern list (#60014)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: dsas <dsas@git.wordpress.org>
  • Loading branch information
4 people authored Mar 20, 2024
1 parent 9741011 commit 071857e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ function PatternsExplorer( { initialCategory, rootClientId } ) {
selectedCategory={ selectedCategory }
patternCategories={ patternCategories }
patternSourceFilter={ patternSourceFilter }
rootClientId={ rootClientId }
/>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,16 @@ function PatternsListHeader( { filterValue, filteredBlockPatternsLength } ) {
);
}

function PatternList( { searchValue, selectedCategory, patternCategories } ) {
function PatternList( {
searchValue,
selectedCategory,
patternCategories,
rootClientId,
} ) {
const container = useRef();
const debouncedSpeak = useDebounce( speak, 500 );
const [ destinationRootClientId, onInsertBlocks ] = useInsertionPoint( {
rootClientId,
shouldFocusBlock: true,
} );
const [ patterns, , onClickPattern ] = usePatternsState(
Expand Down

1 comment on commit 071857e

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in 071857e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/8354386140
📝 Reported issues:

Please sign in to comment.