codeant-ai-for-open-source[bot] commented on PR #38563:
URL: https://github.com/apache/superset/pull/38563#issuecomment-4037717009

   ## **Sequence Diagram**
   
   This PR migrates the collection control from react-sortable-hoc to dnd-kit, 
changing how list items are reordered while preserving the overall behavior of 
adding, reordering, and removing items.
   
   ```mermaid
   sequenceDiagram
       participant User
       participant CollectionControl
       participant DndKit
       participant ParentForm
   
       User->>CollectionControl: Drag item to new position
       CollectionControl->>DndKit: Wrap items in DndContext and SortableContext
       DndKit-->>CollectionControl: DragEnd event with active and over ids
       CollectionControl->>CollectionControl: Compute new order with arrayMove
       CollectionControl->>ParentForm: onChange(updated item list)
   
       User->>CollectionControl: Click Add item
       CollectionControl->>CollectionControl: Create item via itemGenerator
       CollectionControl->>ParentForm: onChange(existing items plus new item)
   ```
   
   ---
   *Generated by [CodeAnt AI](https://codeant.ai)*
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to