-
Notifications
You must be signed in to change notification settings - Fork 14.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(explore): Drag and drop UX improvements #13598
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13598 +/- ##
==========================================
- Coverage 77.29% 73.16% -4.13%
==========================================
Files 910 607 -303
Lines 46359 21568 -24791
Branches 5633 5703 +70
==========================================
- Hits 35831 15781 -20050
+ Misses 10392 5651 -4741
Partials 136 136
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Very nice improvements!
@@ -66,7 +66,8 @@ export default function DndSelectLabel<T, O>( | |||
<ControlHeader {...props} /> | |||
</HeaderContainer> | |||
<DndLabelsContainer canDrop={canDrop} isOver={isOver}> | |||
{isEmpty(props.values) ? renderPlaceHolder() : props.valuesRenderer()} | |||
{props.valuesRenderer()} | |||
{displayGhostButton && renderPlaceHolder()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can we rename renderPlaceHolder
to renderGhostButton
just to be consistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This solution is only for intermediate stage. @ktmud When most of the fields become droppable, our control panel would be twice as long to scroll. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Create a metric immediately when saved metric is dropped * Display borders around control boxes when metric or column is dragged * Fix imports * Display ghost button * Rename placeholder to ghostButton
SUMMARY
This PR adds a few UX improvements to dnd feature implemented in #13575:
In order to test the changes, make sure that
ENABLE_EXPLORE_DRAG_AND_DROP
feature flag is enabledBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-03-12.at.11.43.40.mov
Screen.Recording.2021-03-12.at.16.07.48.mov
TEST PLAN
ADDITIONAL INFORMATION
CC: @villebro @junlincc @zhaoyongjie @ktmud