Closed dannyreaktiv closed 4 weeks ago
I assume this would be a way to manipulate the order
value for pages? What would it do on other data views like Templates or Patterns?
In general I'm not sure this is really compatible with the sorting functionality in data views. What happens if you sort by publish date then drag and drop to re-order?
It would be helpful to unpack the feature a little more if you have the time :) Why do you need drag and drop here?
@jameskoster Thanks for replying. I've got all the time in the world :)
The need is to have a component that provides an array of post IDs for a block to render the posts in a specific order. (Kind of like Query Loop with a $post__in
)
DataViews is a beautiful component, so I was hoping to be able to leverage it.
I think it's more likely to have the ability to pin
items, which could produce similar results with the behavior you're describing. Would that work for your use case?
@dannyreaktiv my interpretation is slightly different to Nik's, I think. I want to fully understand.
It sounds to me that you'd like to have a block that shows a specific set of posts. In the configuration view for that block the posts are displayed using the data view component. Users can drag/drop posts to change the order that the block displays them in.
If that's correct, I'd ask; why not allow users to re-order on the canvas, similar to how images can be re-ordered in Gallery blocks? Otherwise I'm struggling to see a similar use case for core data views, so I'm not sure how it would fit into the roadmap.
@jameskoster Thanks for getting back to me.
I hadn't considered reordering on the canvas. Thanks for the idea!
Noting that for data views, reorder columns has been recently merged: https://github.com/WordPress/gutenberg/pull/64381 I'm going to close this out as it seems to have been more of a back and forth about data views rather than a request. If that's wrong, let's reopen and get more clarity :)
What problem does this address?
Is there anything on the DataViews roadmap to include reordering items via drag and drop?
What is your proposed solution?
Allow for items be rendered via drag and drop. In Table view that would mean reordering rows and in Grid that would mean having the cards be reorderable.