-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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(adhoc-column): add resize option #23748
feat(adhoc-column): add resize option #23748
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23748 +/- ##
==========================================
- Coverage 68.12% 68.08% -0.04%
==========================================
Files 1922 1923 +1
Lines 74104 74140 +36
Branches 8101 8103 +2
==========================================
Hits 50481 50481
- Misses 21545 21581 +36
Partials 2078 2078
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
/testenv up |
@villebro Container image not yet published for this PR. Please try again when build is complete. |
@villebro Ephemeral environment creation failed. Please check the Actions logs for details. |
...rset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
Outdated
Show resolved
Hide resolved
...rset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
Outdated
Show resolved
Hide resolved
...rset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
Outdated
Show resolved
Hide resolved
...rset-frontend/src/explore/components/controls/DndColumnSelectControl/ColumnSelectPopover.tsx
Outdated
Show resolved
Hide resolved
45a0f11
to
14dacf8
Compare
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
SUMMARY
This PR adds resizing to the adhoc column popover, and is based on what's currently used in the metric and filter popovers. This is often needed when writing custom SQL expressions. In addition, the height multiplier of 2 is removed from the metric and filter popovers, as it only makes intuitive sense when the popover placement is set to
left
, in which case the popover grows both upwards and downwards. Since we let AntD decide which placement to use, it makes more sense to not apply multiplier, as the popover often grows out of bounds quickly, causing weird side-effects when the placement changes. This also felt unintuitive, as the vertical movement was doubled, as opposed to horizontal movement, which was not multiplied.AFTER
Now the adhoc column popover is resizable:
Also, the removed multiplier makes the resize action be in line with the vertical mouse movement:
resize-after.mp4
BEFORE
Previously the adhoc column popover wasn't resizable:
Also, the multiplier caused the resize action to feel unintuitive with top placement:
resize-before.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION