-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Sort order for FormTokenField #22048
Comments
Hey Jules. That sounds great! Here is also a Tags PR: I mention the above issues as having a kind of multiselect drop down with a drag and drop element would be very helpful. As one could create a select list and drag the selections into a priority list. |
Hi Paal, thanks the comments! #17009 is very interesting. Good to know that it's possible to reuse components from WooCommerce as well. #21859 doesn't seem so much related to this issue. I'm more interested in the extending the FormTokenField itself. The tag-selection is performed on a higher level, by the FlatTermSelector component. Would you say it's a good idea to make the tokens sortable? Obviously, for the tag-selection this is not important, but there are other use cases, where the sort-order might be relevant. This change-request is actually intended to help developers who want to create more powerful UIs with the default WP components. |
#21589 seems pretty similar to me, it might be that addressing this issue also solves that issue, seeing as they're both related to the ordering used by the component. |
This is something I am interested in looking into for defining the order of a list of posts. |
This would be really useful. Deleting and re-adding items isn't a big deal with a few items (at first I was just using the FormTokenField to select taxonomy terms), but it gets much more cumbersome with a large number of items (now I'm using it to select individual posts, and there are a lot more items to dig through to reselect items). Even just to move the first item to the last slot means everything must be wiped out first and then be reselected from scratch. |
+1, I can definitely use this as well. |
The FormTokenField is a great component for adding relations between posts, taxonomies and any other resources. But it's pretty hard to change the order of the tokens.
The only work-around / alternative I have found so far is by first deleting the token and then re-inserting it.
I would like to suggest a drag and drop mechanism here, and maybe introduce some keyboard shortcuts for changing the order of the tokens.
I would also like to suggest an alternative layout option, that will force each token on a separate line. This, in combination with sort-order, would be pretty useful to create a list of custom related posts for example.
The text was updated successfully, but these errors were encountered: