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): clear custom label if removed #12382

Merged

Conversation

villebro
Copy link
Member

@villebro villebro commented Jan 9, 2021

SUMMARY

When clearing the custom label, it should be reverted to the default label.

AFTER SCREENSHOTS OR ANIMATED GIF

metric_label

ADDITIONAL INFORMATION

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the quick fix!

@junlincc junlincc self-requested a review January 9, 2021 09:17
@junlincc junlincc added the explore:control Related to the controls panel of Explore label Jan 9, 2021
@villebro
Copy link
Member Author

villebro commented Jan 9, 2021

FYI @ktmud this will probably need some further improvement as the current UX is slightly confusing (I can continue next week), but for now this is probably an ok quick fix.

Copy link
Member

@junlincc junlincc left a comment

Choose a reason for hiding this comment

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

ezgif-7-3ad50b53a2d6

LGTM! thanks for the fix! agreed current designed solution is not ideal. we should invest some design effort in Explore popovers

instead of showing my metrics, it should display the auto generated label

@codecov-io
Copy link

codecov-io commented Jan 9, 2021

Codecov Report

Merging #12382 (e7e1067) into master (4175152) will decrease coverage by 15.82%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master   #12382       +/-   ##
===========================================
- Coverage   66.76%   50.93%   -15.83%     
===========================================
  Files        1014      473      -541     
  Lines       49508    16862    -32646     
  Branches     5063     4325      -738     
===========================================
- Hits        33052     8588    -24464     
+ Misses      16322     8274     -8048     
+ Partials      134        0      -134     
Flag Coverage Δ
cypress 50.93% <ø> (+0.57%) ⬆️
javascript ?
python ?

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

Impacted Files Coverage Δ
...explore/components/AdhocMetricEditPopoverTitle.jsx 90.00% <ø> (+25.48%) ⬆️
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 11.76% <0.00%> (-88.24%) ⬇️
...src/dashboard/components/gridComponents/Header.jsx 10.52% <0.00%> (-86.85%) ⬇️
superset-frontend/src/components/IconTooltip.tsx 13.33% <0.00%> (-86.67%) ⬇️
...rc/dashboard/components/gridComponents/Divider.jsx 13.33% <0.00%> (-86.67%) ⬇️
...end/src/SqlLab/components/ExploreResultsButton.jsx 8.00% <0.00%> (-84.00%) ⬇️
... and 872 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 4175152...e7e1067. Read the comment docs.

@junlincc junlincc merged commit 662b649 into apache:master Jan 9, 2021
@villebro
Copy link
Member Author

villebro commented Jan 9, 2021

LGTM! thanks for the fix! agreed current designed solution is not ideal. we should invest some design effort in Explore popovers

instead of showing my metrics, it should display the auto generated label

I have similar thoughts - perhaps greyed out autogenerated label, and black if overridden.

@villebro villebro deleted the villebro/default-adhoc-metric-label branch January 9, 2021 11:25
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 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 explore:control Related to the controls panel of Explore preset-io size/XS 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Explore] Users should be able to clear custom label for adhoc metric
5 participants