feat(adhoc-column): add resize option #23748
Merged
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.
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