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

useEffect( () => {
if ( isEnhancedPagination ) {
// Add the name to the metadata
setAttributes( { metadata: { name: 'Instant Search' } } );
} else {
setAttributes( { metadata: { name: label } } );
// Remove the name from the metadata
const { name, ...metadata } = attributes.metadata || {};
setAttributes( { metadata } );
}
}, [ isEnhancedPagination, setAttributes, label ] );

Expand Down