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(explore): dnd error when dragging metric if multi: false #16088

Merged
merged 2 commits into from
Aug 9, 2021

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Aug 5, 2021

SUMMARY

When dragging a metric a bit in a control that accepts only a single metric, an error occurred. After this fix not only there's no error, but also "Run" button doesn't highlight (as there's no actual change).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: see linked issue
After:
https://user-images.githubusercontent.com/15073128/128349174-53832874-e7d7-42ea-8080-13020bd995fd.mov

TESTING INSTRUCTIONS

  1. Enable dnd
  2. Open a chart that accepts only 1 metric (e.g. Big Number)
  3. Add a metric
  4. Drag the metric label a bit
  5. There should be no "Run" button highlighted and after user clicks run, there's no error

ADDITIONAL INFORMATION

CC @junlincc @jinghua-qa

@codecov
Copy link

codecov bot commented Aug 5, 2021

Codecov Report

Merging #16088 (1657e69) into master (a59d458) will decrease coverage by 0.03%.
The diff coverage is 66.66%.

❗ Current head 1657e69 differs from pull request most recent head af164b3. Consider uploading reports for the commit af164b3 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16088      +/-   ##
==========================================
- Coverage   76.86%   76.83%   -0.04%     
==========================================
  Files         995      995              
  Lines       52876    52890      +14     
  Branches     6720     6724       +4     
==========================================
- Hits        40645    40639       -6     
- Misses      12005    12026      +21     
+ Partials      226      225       -1     
Flag Coverage Δ
javascript 71.22% <75.00%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/dashboard/actions/hydrate.js 1.69% <0.00%> (-0.02%) ⬇️
...tend/src/explore/components/ExploreChartHeader.jsx 55.55% <0.00%> (-0.79%) ⬇️
...nents/controls/MetricControl/AdhocMetricOption.jsx 75.00% <ø> (ø)
...s/controls/MetricControl/MetricDefinitionValue.jsx 80.00% <ø> (ø)
...mponents/controls/MetricControl/MetricsControl.jsx 82.94% <ø> (ø)
superset/charts/schemas.py 100.00% <ø> (ø)
superset/cli.py 51.34% <0.00%> (-0.13%) ⬇️
superset/constants.py 100.00% <ø> (ø)
superset/dashboards/schemas.py 99.37% <ø> (-0.01%) ⬇️
superset/examples/random_time_series.py 19.44% <ø> (ø)
... and 16 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 a59d458...af164b3. Read the comment docs.

@kgabryje
Copy link
Member Author

kgabryje commented Aug 5, 2021

/testenv up FEATURE_ENABLE_DRAG_AND_DROP=true

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

The code looks good to me. Now waiting for env to spin up for manual testing

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

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

@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2021

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

@kgabryje
Copy link
Member Author

kgabryje commented Aug 6, 2021

/testenv up FEATURE_ENABLE_DRAG_AND_DROP=true

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2021

@kgabryje Ephemeral environment spinning up at http://52.42.154.69:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina
Copy link
Member

I was able to reproduce the error:

Screen.Recording.2021-08-06.at.8.57.31.AM.mov

@kgabryje
Copy link
Member Author

kgabryje commented Aug 9, 2021

@michael-s-molina Thanks for catching that! My original fix worked with dnd enabled, I added a fix for non-dnd now

Screen.Recording.2021-08-09.at.10.47.40.mov

@kgabryje kgabryje merged commit b7cc89c into apache:master Aug 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2021

Ephemeral environment shutdown and build artifacts deleted.

@rosemarie-chiu
Copy link
Contributor

🏷 2021.31

@villebro villebro added the v1.3 label Aug 10, 2021
villebro pushed a commit that referenced this pull request Aug 10, 2021
* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls

(cherry picked from commit b7cc89c)
stevenuray pushed a commit to preset-io/superset that referenced this pull request Aug 11, 2021
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls

(cherry picked from commit b7cc89c)
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls

(cherry picked from commit b7cc89c)
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls

(cherry picked from commit b7cc89c)
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
…16088)

* fix(explore): dnd error when dragging metric if multi: false

* Fix error for non-dnd controls

(cherry picked from commit 04a3982)
@mistercrunch mistercrunch added 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.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:2021.31 size/S v1.3 🍒 1.3.0 🍒 1.3.1 🍒 1.3.2 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[d&d][big number with trend line] Move Metric from 'METRIC' filed will lead to unexpected error
6 participants