-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Query and Search blocks: support for Instant Search #63147
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
Closed
r-chrzan
wants to merge
86
commits into
WordPress:trunk
from
r-chrzan:feature/query-and-search-blocks-support-for-instant-search
Closed
Changes from 31 commits
Commits
Show all changes
86 commits
Select commit
Hold shift + click to select a range
c3fd536
adding the necessary directives
793e330
add filter for query loop, rest necessarily things
0159a4a
Switch to isSearchInputInitiallyVisible so it works with navigation
luisherranz 29b2399
Remove redundant await
michalczaplinski 5952a03
Update the filter that adds the search param to query block
michalczaplinski f0944db
Refactor the view.js of search block
michalczaplinski 5a85f98
Move changes from the `query_loop_block_query_vars` filter to inside …
michalczaplinski 520629d
Add a comment in search/view.js
michalczaplinski b3331d5
Merge remote-tracking branch 'origin/trunk' into feature/instant-sear…
michalczaplinski f4776db
I messed up the merge commit earlier
michalczaplinski ce27856
First stab at making search work for "inherited" queries
michalczaplinski be75444
Forgot to check if $enhanced_pagination was on
michalczaplinski 6fbf19c
remove the error_log()
michalczaplinski 7627a35
reorder variables for easier review
michalczaplinski 288603a
remove linebreak
michalczaplinski 03d1be0
Add the missing space before parens
michalczaplinski 1495a42
Add the experimental setting
michalczaplinski f249ed3
Add the experimental setting of for search and query block
michalczaplinski ca0e697
Fix the phpcs spaces
michalczaplinski d2fb6e6
Actually fix the phpcs lint 🤦♂️
michalczaplinski 4624655
Merge branch 'trunk' into instant-search
e7d45bb
Merge branch 'trunk' into feature/query-and-search-blocks-support-for…
68d780e
Changes from #65950
ed9b908
Rename `search` to `instant-search`
michalczaplinski c63840a
remove the `name`
michalczaplinski a55194f
Add support for inherited queries
michalczaplinski 73b525b
Merge remote-tracking branch 'origin/trunk' into feature/query-and-se…
michalczaplinski 6583a43
Merge branch 'feature/instant-search-block' into feature/query-and-se…
michalczaplinski 81ba04c
remove the unneeded changes to post-template/index.php
michalczaplinski fa14b25
debounce the search
michalczaplinski a699ce3
fix phpcs complaint
michalczaplinski 9a4e78f
data-on-async--input
michalczaplinski aaeee09
use `window.location.href`
michalczaplinski 818bc96
use the constructed URL
michalczaplinski 289f583
Update packages/block-library/src/search/view.js
michalczaplinski c55cf31
Update packages/block-library/src/search/view.js
michalczaplinski 9f2329b
Merge remote-tracking branch 'origin/trunk' into feature/query-and-se…
michalczaplinski 87f5d00
get value from event.target
michalczaplinski 15fe455
Merge remote-tracking branch 'origin/trunk' into feature/query-and-se…
michalczaplinski 853083b
Add inherited context to search block
michalczaplinski 3b5da50
Remove state and add the search to context in Search block
michalczaplinski 1996b83
Use a proper debounce and take into account the multiple query blocks
michalczaplinski 020c638
simplify how we enqueue search/view module
michalczaplinski 853bed5
Update the query pagination numbers.
michalczaplinski 51caf3e
Reset the pagination upon navigation
michalczaplinski f2e16be
Handle query-pagination-next correctly
michalczaplinski e89fd61
Rename $search_query_inherited to $search_query_global
michalczaplinski 9a0e161
Ensure that the global instant search gets passed to the URL.
michalczaplinski 5e00cdb
Don't remove the `paged` query param. Set it to `1` instead.
michalczaplinski 786f7ba
Remove the pagination when clearing the search
michalczaplinski 5a77f22
Reset pagination correctly on the frontent
michalczaplinski 1c99346
Check if queryId exists in context before using it
michalczaplinski 9883d0f
Appease the PHP formatter
michalczaplinski 2029d4f
Add a @since tag to get_total_pages_from_query()
michalczaplinski 00910e5
Reset the global `$wp_query` correctly
michalczaplinski 370a0c5
Check if queryId is defined in context and rename search_query to query
michalczaplinski 1be76e0
Use the query-no-results block
michalczaplinski 4414176
Add a bunch of e2e tests
michalczaplinski 42cdfb1
Add a bunch more e2e tests and a util to navigate to next page.
michalczaplinski df73c87
Format PHP again 🙄
michalczaplinski 67175ea
Merge remote-tracking branch 'origin/trunk' into feature/query-and-se…
michalczaplinski 60a15f4
Revert adding `page` to the interactivityUtils
michalczaplinski b4c3913
Extracted pagination logic into a reusable function `goToNextPage()`.
michalczaplinski 2bb439e
Remove the inline script for search query block
michalczaplinski 1edf044
Check BOTH if enhanced pagination AND instant search experiement are on.
michalczaplinski d070fe5
Guard against `queryId` being undefined
michalczaplinski d023c1d
Remove default query from src
michalczaplinski 5e02671
Remove default query from tests
michalczaplinski 6392614
Remove handling of inheritd query from `search/index.php`
michalczaplinski baa6188
Handle case when query is defined in block context in DB.
michalczaplinski a012780
appease the formatter
michalczaplinski 4c0caee
Merge branch 'trunk' into feature/query-and-search-blocks-support-for…
michalczaplinski bd080db
Guard against queryId being undefined in block context
michalczaplinski ea01121
Fix the e2e test suite
michalczaplinski 66c991a
Add an e2e test case if query.search attribute is present
michalczaplinski 00a8a8b
Remove the search button when instant search is enabled
michalczaplinski dad41ca
Do not delete pages and templates in e2e tests
michalczaplinski 68985af
Set the pageId for Multiple Queries tests
michalczaplinski dac2ec1
Fix the block name via metadata when Seach is instant.
michalczaplinski 91863c0
Remove stuff related to Default queries from `view.js`
michalczaplinski 1b7b4bf
Add `attributes.metadata` to useEffect dependency array
michalczaplinski 3dcf20f
Remove `attributes.metadata` & label from dependency array
michalczaplinski ff1d50b
Merge remote-tracking branch 'origin/trunk' into feature/query-and-se…
michalczaplinski 33fd080
Explain why we disable the react-hooks/exhaustive-deps lint
michalczaplinski db9ceee
Undo formatting changes
michalczaplinski 7b326ce
Don't use `Promise.withResolvers()` in search block's view.js
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 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
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
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.