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: Partial revert of 17236 #17383

Merged

Conversation

john-bodley
Copy link
Member

@john-bodley john-bodley commented Nov 9, 2021

SUMMARY

This is a partial revert of #17236 as it seems other chart types: all ECharts, Bar Chart, etc. already perform an implicit ordering if undefined, i.e., the ship has sailed on this one—previously I wasn't aware just how prevalent the behavior was and thus the fallback seems like the rule rather than the exception. I also added updated comments to reflect this behavior.

Personally I'm a tad upset/frustrated that this behavior differs by chart type (search for sort_by in viz.py) as this simply adds confusion to the user and leads to a very inconsistent UX. When we introduce new behaviors we should:

  1. Strive to make them consistent throughout.
  2. Indicate said changes in UPDATING.md so institutions can inform/educate users of said changes.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

CI.

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

@john-bodley john-bodley requested review from etr2460, villebro and zhaoyongjie and removed request for etr2460 November 9, 2021 18:54
@john-bodley john-bodley changed the title revert: Partial revert of 17236 other: Partial revert of 17236 Nov 9, 2021
@john-bodley john-bodley force-pushed the john-bodley--partial-revert-17236 branch from 634e5f2 to 96cdacc Compare November 9, 2021 19:05
@john-bodley john-bodley changed the title other: Partial revert of 17236 fix: Partial revert of 17236 Nov 9, 2021
@john-bodley john-bodley force-pushed the john-bodley--partial-revert-17236 branch from 96cdacc to 5681933 Compare November 9, 2021 19:16
@codecov
Copy link

codecov bot commented Nov 9, 2021

Codecov Report

Merging #17383 (5681933) into master (7d22c9c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17383   +/-   ##
=======================================
  Coverage   77.02%   77.02%           
=======================================
  Files        1038     1038           
  Lines       56013    56016    +3     
  Branches     7735     7735           
=======================================
+ Hits        43142    43145    +3     
  Misses      12613    12613           
  Partials      258      258           
Flag Coverage Δ
hive 81.48% <100.00%> (+<0.01%) ⬆️
javascript 71.22% <ø> (ø)
mysql 81.91% <100.00%> (+<0.01%) ⬆️
postgres 81.92% <100.00%> (+<0.01%) ⬆️
presto 81.78% <100.00%> (+<0.01%) ⬆️
python 82.41% <100.00%> (+<0.01%) ⬆️
sqlite 81.59% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
superset-frontend/src/explore/controls.jsx 30.98% <ø> (ø)
superset/utils/core.py 90.14% <100.00%> (+0.03%) ⬆️
superset/viz.py 57.99% <100.00%> (ø)

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 7d22c9c...5681933. Read the comment docs.

@@ -1326,6 +1326,11 @@ def get_metric_names(metrics: Sequence[Metric]) -> List[str]:
return [metric for metric in map(get_metric_name, metrics) if metric]


def get_first_metric_name(metrics: Sequence[Metric]) -> Optional[str]:
Copy link
Member

Choose a reason for hiding this comment

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

this should probably be get_first_metric_label, but i'll stamp because it's only a revert

Copy link
Member Author

Choose a reason for hiding this comment

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

Although @etr2460 the function call get_metric_names but assigns these to the metric_labels variable thus the variable as opposed to the function could be misnamed.

@john-bodley john-bodley merged commit 675ffaf into apache:master Nov 11, 2021
@john-bodley john-bodley deleted the john-bodley--partial-revert-17236 branch November 11, 2021 04:32
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
Co-authored-by: John Bodley <john.bodley@airbnb.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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/M 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants