Description
When dragging token set folders in the sidebar to reorder them, the order gets scrambled if the folders are expanded (children visible). Drag-and-drop reordering only works correctly when folders are collapsed first.
Steps to Reproduce
- Open Tokens Studio for Figma plugin
- Have multiple token set folders in the sidebar
- Expand one or more folders so child sets are visible
- Drag a folder to reorder it
- Observe that the folder lands in an unexpected position and the overall order gets scrambled
Expected Behavior
Token set folders should reorder correctly regardless of whether they are expanded or collapsed.
Actual Behavior
The drag-and-drop index calculation appears to count expanded child items in the position, causing the folder to land at an unexpected index in the flat list.
Workaround
Collapse all folders before dragging them to reorder. This produces the correct result.
Environment
- Plugin version: v2.11.2 (PRO)
- OS: macOS 15.7.4
References
Description
When dragging token set folders in the sidebar to reorder them, the order gets scrambled if the folders are expanded (children visible). Drag-and-drop reordering only works correctly when folders are collapsed first.
Steps to Reproduce
Expected Behavior
Token set folders should reorder correctly regardless of whether they are expanded or collapsed.
Actual Behavior
The drag-and-drop index calculation appears to count expanded child items in the position, causing the folder to land at an unexpected index in the flat list.
Workaround
Collapse all folders before dragging them to reorder. This produces the correct result.
Environment
References