culturecreates / footlight-app

Footlight CMS Front-end
https://cms.footlight.io
3 stars 0 forks source link

Reordering of taxonomy terms inside destination fields #1419

Open troughc opened 3 weeks ago

troughc commented 3 weeks ago

How hard would it be to add functionality to reorder selected terms (from taxonomies) in fields? How much effort/time and what are the risks (if any)?

For example, to reorder these terms in the 'Discipline' field shown in the screenshot. The idea is that a user could drag the bubbles (with terms) to reorder them. And then in the backend they would also be reordered so that they were sent from the API in the selected order.

Image

AbhishekPAnil commented 2 weeks ago

By default, Ant Design's TreeSelect component does not support reordering selected nodes within a multi-select field. To implement this, the component needs to be customized, likely requiring each field's value change to be managed with an individual or object-based state. While this presents a challenge, it is achievable.

UI tasks : 7-8 hrs

  1. Research and Setup (30-60 minutes)
  2. State Management and Customization (1-2 hours)
  3. Integration with Drag-and-Drop (1-2 hours)
  4. Testing (1-2 hours)