psorensen / curated-query-loop Goto Github PK
View Code? Open in Web Editor NEWCurate specific posts when using the Query Loop block
License: GNU General Public License v3.0
Curate specific posts when using the Query Loop block
License: GNU General Public License v3.0
Hi @psorensen,
We have this use case where we want to be able to set the number of items an editor can manually select.
What do you think of using the Query Loop posts per page setting to define the ContentPicker's maxContentItems
?
https://github.com/psorensen/curated-query-loop/blob/main/assets/js/admin/block-extension.js#L30
maxContentItems={query.perPage || 10}
When the user changes the post type setting in the query loop settings, the selectedPosts should be reset, given that the selectedPosts will not be present in the resulting query results.
As a user I should be able to transform a standard Query Loop into a Curated Query Loop and maintain the same post template.
Currently, the content-search interface is provided by @10up/block-components
. Update to use core SearchControl
As an editor setting up a curated query loop, I'd expect this workflow:
The current logic prevents this workflow because it is automatically updating the posts_per_page
attribute whenever a post is selected, removing the search bar and preventing the user from easily searching for another post.
One solution is the always show the search bar, but this will prevent us from enforcing a limit.
Hi @psorensen
What are your thoughts on adding an option to autofill the posts if the curated posts are less than the posts.perPage or the default 10?
Let's say that an editor wants to show 5 posts, but only manually picked 2. With this option, the remaining 3 would be automatically fetched based on the query parameters?
Cypress is currently set up, but the tests are still boilerplate.
Steps to reproduce:
As per what icon, I guess it should be the query loop icon?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.