-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Query and Search blocks: support for Instant Search via query_loop_block_query_vars
filter
#67181
Open
michalczaplinski
wants to merge
30
commits into
trunk
Choose a base branch
from
feature/search-query-using-vars-filter
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+925
−45
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
def5f01
add the filter and test
michalczaplinski 2886139
remove
michalczaplinski c8b390b
Create instant search using `render_block_context` filter.
michalczaplinski 00d90f3
Remove handling of inheritd query from `search/index.php`
michalczaplinski 6214a72
Handle case when query is defined in block context in DB.
michalczaplinski cbb469c
Guard against queryId being undefined in block context
michalczaplinski 571d851
Fix the e2e test suite
michalczaplinski f922695
Move the filter to `/experimental` folder.
michalczaplinski c1eb9de
Add an e2e test case if query.search attribute is present
michalczaplinski 970908f
Remove the search button when instant search is enabled
michalczaplinski 98a0e23
Use the query_loop_block_query_vars filter
michalczaplinski 64d68da
Do not delete pages and templates in e2e tests
michalczaplinski 2a89b6a
Set the pageId for Multiple Queries tests
michalczaplinski 7cad091
Fix the block name via metadata when Seach is instant.
michalczaplinski 7e1e27b
Remove stuff related to Default queries from `view.js`
michalczaplinski b4d16f7
Add `attributes.metadata` to useEffect dependency array
michalczaplinski 9095031
Remove `attributes.metadata` & label from dependency array
michalczaplinski ca253ef
Don't use `Promise.withResolvers()` in search block's view.js
michalczaplinski cf27754
Explain why we disable the react-hooks/exhaustive-deps lint
michalczaplinski a5c2b17
Undo formatting changes
michalczaplinski 2fc61fd
Create instant search using `render_block_context` filter.
michalczaplinski 5846998
Undo formatting changes
michalczaplinski 4b2f66d
Remove the `render_block_context` filter from blocks.php
michalczaplinski 1bf3f4b
Merge branch 'trunk' into feature/search-query-using-vars-filter
michalczaplinski ee2739d
Fix how directives are added to the form in the search block.
michalczaplinski 806c330
Add e2e test for renaming Search block to "Instant Search" in the Lis…
michalczaplinski 2e7432d
Appease the PHP formatter
michalczaplinski 049fc67
Merge remote-tracking branch 'origin/trunk' into feature/search-query…
michalczaplinski 95a9647
Update lib/experimental/blocks.php
michalczaplinski ac750ae
Update the comment in Search block to clarify when Instant Search is …
michalczaplinski 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
There are no files selected for viewing
This file contains 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 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 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 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 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.
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.
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.
What does this do?
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.
It renames the block to "Instant Search". The updated name shows up in the ListView and the Inspector Controls.
We want to "upgrade" the Search block to Instant Search when 2 conditions are met:
enhancedPagination
enabled (The "Reload full page" switch is OFF)