rusackas commented on PR #35867:
URL: https://github.com/apache/superset/pull/35867#issuecomment-4827324519

   Picked this up to get it across the line, @CoderSxy, thanks for diagnosing a 
genuinely annoying bug! The swap-vs-reorder root cause was spot on. I rebased 
on current master and reworked it a bit:
   
   - The swap → splice-reorder fix is applied across all the controls 
(`DndMetricSelect`, `DndFilterSelect`, `DndColumnSelect` via a new 
`OptionSelector.reorder`, and `AdhocFilterControl`). That last one had been 
converted to a TS function component on master since you opened this, so I 
ported the fix to the new `setValues(prev => ...)` form (the old `.jsx` patch 
referenced `this.values`, which no longer exists).
   - Dropped the `onChange(newValue)` that had been added inside 
`DndMetricSelect.moveLabel`, since `handleDropLabel` already persists on drop, 
so firing it on every hover would have re-queried mid-drag.
   - Added an `OptionSelector.reorder` unit test pinning the regression (moving 
an item across several positions must preserve the order of the rest, which a 
swap would scramble).
   
   Frontend pre-commit and the affected component tests pass locally. Running 
CI now 🤞


-- 
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