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

fix: Cannot re-order metrics by drag and drop #19876

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

The metric tooltip gets in the way of re-ordering metrics, dragging over to lower the metric in the list doesn't work.

There's an architecture already in place to handle the dragging for other scenarios. This PR expands that to include the metrics, by disabling the tooltip on drag.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

old.mov

After:

new.mov

TESTING INSTRUCTIONS

Create a chart and add to it several metrics.
Before trying to drag and drop, hover over the metric until the tooltip appears.

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

@diegomedina248 diegomedina248 force-pushed the fix/cannot-re-order-metrics-by-drag-and-drop branch from 9ca9705 to c47f21c Compare April 28, 2022 01:51
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #19876 (c47f21c) into master (f9d28a1) will increase coverage by 0.03%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##           master   #19876      +/-   ##
==========================================
+ Coverage   66.48%   66.51%   +0.03%     
==========================================
  Files        1713     1714       +1     
  Lines       64995    65030      +35     
  Branches     6698     6713      +15     
==========================================
+ Hits        43209    43257      +48     
+ Misses      20079    20065      -14     
- Partials     1707     1708       +1     
Flag Coverage Δ
javascript 51.24% <80.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
...controls/DndColumnSelectControl/DndSelectLabel.tsx 72.72% <ø> (ø)
...-ui-chart-controls/src/components/MetricOption.tsx 90.90% <75.00%> (-3.83%) ⬇️
...plore/components/controls/OptionControls/index.tsx 78.02% <100.00%> (+2.19%) ⬆️
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <0.00%> (-19.05%) ⬇️
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <0.00%> (ø)
...s/plugin-chart-echarts/src/utils/formDataSuffix.ts 100.00% <0.00%> (ø)
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 59.36% <0.00%> (+0.14%) ⬆️
...ontrols/DndColumnSelectControl/DndMetricSelect.tsx 60.74% <0.00%> (+2.22%) ⬆️
.../components/Header/HeaderActionsDropdown/index.jsx 71.66% <0.00%> (+3.87%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9d28a1...c47f21c. Read the comment docs.

@rusackas rusackas merged commit e4fca89 into apache:master Apr 28, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@github-actions
Copy link
Contributor

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

hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
* fix: cannot-re-order-metrics-by-drag-and-drop

* add tests
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
* fix: cannot-re-order-metrics-by-drag-and-drop

* add tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.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 Preset-Patch size/M 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants