-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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
fix(explore): drag and drop indicator UX #27558
fix(explore): drag and drop indicator UX #27558
Conversation
Looks great! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #27558 +/- ##
==========================================
+ Coverage 67.46% 67.51% +0.04%
==========================================
Files 1910 1911 +1
Lines 74802 74894 +92
Branches 8345 8371 +26
==========================================
+ Hits 50467 50561 +94
+ Misses 22284 22273 -11
- Partials 2051 2060 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
/testenv up |
@justinpark Ephemeral environment spinning up at http://35.92.142.13:8080. Credentials are |
background-color: ${({ theme, canDrop }) => | ||
canDrop ? theme.colors.primary.base : theme.colors.error.light1}; | ||
z-index: 10; | ||
opacity: 0.2; |
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.
display: ${({ isDragging }) => (isDragging ? 'block' : 'none')}; | ||
background-color: ${({ theme, canDrop }) => | ||
canDrop ? theme.colors.primary.base : theme.colors.error.light1}; | ||
z-index: 10; |
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.
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.
Great
background-color: ${({ theme }) => theme.colors.primary.base}; | ||
z-index: 10; | ||
opacity: 0.3; | ||
top: -4px; |
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.
Same for the z-index/opacity here, but also, if these positions are based on the "drop zone" having a gridUnit of space, you might want to use the gridUnit
here as well for these 4px offsets. Then if someone changes the gridUnit to 6px or 2px in their theme, it'll all line up nicely :D
This is looking awseome! Left some CSS comments about under-utilized zindex/opacity settings, which we ought to be propagating throughout code whenever we get the chance :D |
/testenv down |
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.
Thanks for the touchups! LGTM!
@kasiazjc do you have any inputs with regards to the design change? Note this change is inline with how droppable zones function for dashboards. |
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.
Thank you for the improvement @justinpark!
isLoading || (canDrop && isOver) ? 'block' : 'none'}; | ||
background-color: ${({ theme, isLoading }) => | ||
isLoading ? theme.colors.grayscale.light3 : theme.colors.primary.base}; | ||
z-index: ${({ theme }) => theme.zIndex.dropdown}; |
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.
Could you move the variables to the top? Like:
const TooltipSectionWrapper = styled.div`
${({ theme }) => css`
font-size: ${theme.typography.sizes.s}px;
&:not(:last-of-type) {
margin-bottom: ${theme.gridUnit * 2}px;
}
`}
`;
to avoid repeating:
${({ theme, isDragging, isLoading }) => ... };
a24c8b9
to
bdfb926
Compare
Ephemeral environment shutdown and build artifacts deleted. |
(cherry picked from commit 7369754)
(cherry picked from commit 8b5a563)
SUMMARY
The current explore drag-and-drop (DND) indicator only highlights the drop allow zone, and users can recognize the disallowed zone when they try to drop an item there. However, this UX can be challenging when the current dragging item is not droppable in the entire zone, as there is no highlighting to indicate this.
before--dnd-feedback.mov
This lack of feedback can lead users to believe that the DND functionality is not working, until they mouse over the zone.
This commit aims to address this UX issue by implementing changes. Now, all droppable zones will be highlighted when dragging, and a different color scheme will indicate which zones are available and which are unavailable for dropping.
after--dnd-feedback.mov
Additionally, the commit also updates the drag over feedback to align with the changes made to the dashboard's DND UX(#26699). This way, users can have a consistent and improved drag-and-drop experience, with clear usability feedback.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
before--explore-dnd-indicator.mov
After:
after--explore-dnd-indicator.mov
TESTING INSTRUCTIONS
Create a "Table" chart
Select RAW RECORDS and then drag the Metrics to check where is droppable zone
ADDITIONAL INFORMATION