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.
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 #67181base: trunk
Are you sure you want to change the base?
Query and Search blocks: support for Instant Search via
query_loop_block_query_vars
filter #67181Changes from 28 commits
def5f01
2886139
c8b390b
00d90f3
6214a72
cbb469c
571d851
f922695
c1eb9de
970908f
98a0e23
64d68da
2a89b6a
7cad091
7e1e27b
b4d16f7
9095031
ca253ef
cf27754
a5c2b17
2fc61fd
5846998
4b2f66d
1bf3f4b
ee2739d
806c330
2e7432d
049fc67
95a9647
ac750ae
de34a1e
4ce8096
b1c11f4
3dd53b9
bdaaf2e
97b3c84
2095706
77e86d2
4fcb01b
15b80fe
dd42f50
1d70719
e0dd93b
2db363a
c20526f
6b975c4
7ca6d27
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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)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.
Good catch, @draganescu. First, the user typically sets the
metadata.name
. What if the user set a different name for the block before enhanced pagination was activated? Second, the values visible in the UI should always be translatable. This attribute is also special, for example Pattern Overrides flow asks the user to provide the name for the block when activating the feature and the value gets stored inmetadata.name
and used as a reference for overriding the value. So side effects like this should be used following these considerations.What is the goal of changing this name?
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.
My goal is to rename the block so that the user can distinguish between the Search block with the Instant Search and a regular Search block.
You can see how it should look in the UI in the video in the PR description:
output_70b3a0.mp4
I didn't realize this was possible. Good catch. Given this, we probably shouldn't update the
metadata.name
then.We can just leave the block as is (no name change) or have an explicit opt-in. My thinking was that having the Search block just automatically become Instant Search when it's placed inside of a Query Loop with enhanced pagination is not explicit enough. Some users might miss that such a block is then an Instant Search block.
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'd be useful to say why?
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.
OK! I've updated the comment.