-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Support searching for patterns #21944
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c451082
Support searching for patterns
youknowriad 255ad3c
Use pattern names as keys
youknowriad 8a0e775
Improve the async rendering
youknowriad 994675f
clean the search items code per review
youknowriad b0f76c5
Restore patterns titles
youknowriad c164f19
Fix e2e test
youknowriad 15b61e0
Code change per review
youknowriad 93e9d59
Fix inserting patterns using keyboard
youknowriad 7babfa3
use the same string for block and patterns for search results
youknowriad 07a246a
no search results term
youknowriad 9b237e0
fix test
youknowriad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Support searching for patterns
- Loading branch information
commit c451082d97777ec6d16911a4058b900dcb1527e1
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/block-editor/src/components/inserter/no-results.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| /** | ||
| * WordPress dependencies | ||
| */ | ||
| import { createInterpolateElement } from '@wordpress/element'; | ||
| import { __, sprintf } from '@wordpress/i18n'; | ||
| import { Icon, blockDefault } from '@wordpress/icons'; | ||
|
|
||
| function InserterNoResults( { filterValue } ) { | ||
| return ( | ||
| <div className="block-editor-inserter__no-results"> | ||
| <Icon | ||
| className="block-editor-inserter__no-results-icon" | ||
| icon={ blockDefault } | ||
| /> | ||
| <p> | ||
| { createInterpolateElement( | ||
| sprintf( | ||
| /* translators: %s: search term. */ | ||
| __( 'Sorry no results found on <strong>%s</strong>.' ), | ||
youknowriad marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| filterValue | ||
| ), | ||
| { strong: <strong /> } | ||
| ) } | ||
| </p> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default InserterNoResults; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.