This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
POC: use the filter query.entityRecordsArgs
to customize the getEntityRecords behavior
#7075
Closed
Conversation
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
gigitux
changed the title
POC: use the filter query.entityRecordsArgs to customize the getEntityRecords behavior.
POC: use the filter query.entityRecordsArgs to customize the getEntityRecords behavior
Sep 6, 2022
rubikuserbot
requested review from
a team and
albarin
and removed request for
a team
September 6, 2022 14:04
…yRecords behavior
gigitux
force-pushed
the
try/use-filter-for-get-on-sale-products
branch
from
September 6, 2022 14:05
8088891
to
14bdef9
Compare
The release ZIP for this PR is accessible via:
|
Size Change: 0 B Total Size: 873 kB ℹ️ View Unchanged
|
gigitux
changed the title
POC: use the filter query.entityRecordsArgs to customize the getEntityRecords behavior
POC: use the filter Sep 6, 2022
query.entityRecordsArgs
to customize the getEntityRecords behavior
I close this issue. We decided to proceed with another solution (#6975) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is another attempt (#6975) to have a live preview experience for the Product Query on the editor side.
With this attempt, I want to try to customize the getEntityRecords behavior with the JS filters.
Thanks to the JS filter, it is possible to customize the endpoint that
getEntityRecords
fetches. This allows us to use WooCommerce API instead of WordPress API. In this way, we could fetch products with a specific filter (by price, on sale, etc).Unfortunately, there are also disadvantages/blockers to this approach:
Gutenberg PR sunyatasattva/gutenberg#4
Gutenberg Issue WordPress/gutenberg#34201