[Data Views] Enhance UX and Add drag and drop ordering for Filter properties and table column #66981
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
This PR addresses issue #66611. It implements the initial design mockup provided and adds drag-and-drop functionality to the property list. Additionally, it includes basic CSS adjustments for visual consistency and utilizes available icons for improved UI clarity.
Why?
This update enhances the user experience by allowing easier reordering of properties in the list through drag-and-drop functionality. It also improves UI consistency, aligning with the design specifications outlined in the mockup and leveraging existing icons to maintain visual coherence. This change aims to streamline interactions with the property list and increase usability.
How?
This implementation leverages React's built-in hooks to achieve drag-and-drop functionality. It combines JavaScript event handlers—onDragStart, onDrop, and onDragOver—with useState for managing component state dynamically. Additionally, useRef is utilized alongside setDragImage to render a preview of the row during dragging.
To keep the solution simple and lightweight, no external libraries were used, ensuring minimal dependencies and improved maintainability.
Testing Instructions
Screenshots
demo.mp4