EnxDev opened a new pull request, #36855:
URL: https://github.com/apache/superset/pull/36855

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fixes multiple issues with tab drag-and-drop reordering in dashboard edit 
mode:
   
   - **Stale state bug**: After the first tab reorder, subsequent drag 
operations used outdated tab positions, causing incorrect reordering behavior
   - **Slow drag movement**: Tabs had a visible delay when being dragged due to 
CSS transitions
   - **Tab label opacity**: Labels could become semi-transparent during drag 
operations
   - **TypeScript types**: `LineEditableTabs` component was missing proper type 
definitions for `fullHeight` and other `TabsProps`
   
   ## Changes
   
   - Add `key` prop to `DndContext` to force re-initialization when tab order 
changes
   - Use `useRef` to track current `tabIds` in drag callbacks, avoiding stale 
closure issues
   - Remove CSS transition during drag for immediate visual feedback
   - Ensure tab labels maintain full opacity during drag operations
   - Add `activeKey` to `handleTabsReorder` dependencies for proper state 
synchronization
   - Fix `LineEditableTabs` TypeScript types to properly expose `TabsProps`
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Open a dashboard with multiple tabs in edit mode
   2. Drag a tab to a new position (e.g., first tab to last position)
   3. Verify the tab moves correctly
   4. Drag another tab to a different position
   5. Verify the second drag also works correctly (this was previously broken)
   6. Verify the selected tab indicator stays on the correct tab throughout
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   es new feature or API
   - [ ] Removes existing feature or API
   


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