Closed iansvo closed 1 month ago
@tomusborne Us waiting to retire the Query Loop block like
@tomusborne So far I think the last thing remaining is cleaning up the attribute names so they make a bit more sense and we're not using a wpQuery attribute. I think we need to keep the attributes the same in a few places to avoid compatibility problems with the Query Loop block, or else namespace these context values differently.
Definitely super close to having this done, but I think this needs to happen first before we merge so we're not stuck with that super specific attribute.
Cool, clean up time - let's make sure we're not holding on to any baggage here that we don't need to.
Then we can look at how extendable it is for things like nested loops, ACF integration etc..
Would love to see the ability to query other things like taxonomies, users etc alongside nested loops too.
Would love to see the ability to query other things like taxonomies, users etc alongside nested loops too.
This is something that we're going to tackle in future iterations of the new block. It's absolutely on the roadmap. One thing we're specifically interested in is a proper ACF integration, but in general we want this to be as multi purpose as possible.
@iansvo Are you able to get the loop to load on the frontend?
Also, the WP_Query SelectControl
- should it display if it only has one option? Maybe we need a filter here to add more options, but the select only shows if there's more than one.
@tomusborne Both things are resolved in my latest push. I had a few instances of the old context/attributes I missed and I updated the queryType to just be filterable like you said.
JetEngine User here 🙋♂️ hope this will work also for JE!?
JetEngine User here 🙋♂️ hope this will work also for JE!?
Our first-class integration is going to initially be with ACF, but we will be exploring ways we can allow folks to filter things and effectively use whatever query source they can think of. But we'll have to see how that all looks as we develop. We want to introduce flexibility without a bunch of technical debt, so that's going to require some experimentation.
This code has been ported into new blocks in 2.0. Closing this.
Fixes #967 #1061
This PR adds a new block: Looper. This block is based on some work @tomusborne did previously and I made a few adjustments and optimizations.
Dev Tasks
Changes
@utils
and@components
. I added a jsconfig.json file to make sure they work correctly in IDE's such as VSCode so they will be seen by webpack, babel, eslint, etc.Next Steps
ul
orol
. If someone is going to use this to potentially loop anything then having the list structure as an option is necessary.