Skip to content
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

Merged
merged 4 commits into from
Apr 20, 2023

Conversation

villebro
Copy link
Member

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:
image

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:
image

Also, the multiplier caused the resize action to feel unintuitive with top placement:

resize-before.mp4

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Apr 20, 2023

Codecov Report

Merging #23748 (9c28f66) into master (b2b8c3e) will decrease coverage by 0.04%.
The diff coverage is 2.70%.

❗ Current head 9c28f66 differs from pull request most recent head 14dacf8. Consider uploading reports for the commit 14dacf8 to get more accurate results

@@            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              
Flag Coverage Δ
javascript 54.11% <2.70%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.29% <0.00%> (-0.04%) ⬇️
...ols/FilterControl/AdhocFilterEditPopover/index.jsx 70.21% <ø> (ø)
...ols/MetricControl/AdhocMetricEditPopover/index.jsx 81.37% <ø> (ø)
superset-frontend/src/explore/constants.ts 100.00% <ø> (ø)
...ontrols/DndColumnSelectControl/useResizeButton.tsx 2.77% <2.77%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@villebro villebro requested a review from kgabryje April 20, 2023 11:43
@villebro
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@villebro Container image not yet published for this PR. Please try again when build is complete.

@github-actions
Copy link
Contributor

@villebro Ephemeral environment creation failed. Please check the Actions logs for details.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Apr 20, 2023
@villebro villebro force-pushed the villebro/resize-adhoc-column branch from 45a0f11 to 14dacf8 Compare April 20, 2023 12:58
Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@villebro villebro merged commit 60c9d68 into apache:master Apr 20, 2023
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants