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

[SIP-5] Repair and refactor CountryMap #5721

Merged
merged 8 commits into from Aug 30, 2018
Merged

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Aug 24, 2018

  • Extract slice and formData
  • Improve text label location and transition
  • Minor css
  • Fix bound calculation so the map doesn't fall of screen.
  • Cache map json so it doesn't send new ajax call every time.

Before
country_map_test

After
idhealth__pct_users_identity_verified_for_homes_booking_and_profile__7d_avg

Before
country_before

After
country_after

@williaster @conglei

@codecov-io
Copy link

Codecov Report

Merging #5721 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5721      +/-   ##
==========================================
- Coverage   63.38%   63.37%   -0.02%     
==========================================
  Files         361      361              
  Lines       22995    22999       +4     
  Branches     2559     2566       +7     
==========================================
  Hits        14575    14575              
- Misses       8405     8409       +4     
  Partials       15       15
Impacted Files Coverage Δ
superset/assets/src/visualizations/country_map.js 0% <0%> (ø) ⬆️

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 54ae215...4b47812. Read the comment docs.

@williaster williaster added this to In progress in Embeddable Charts via automation Aug 29, 2018
Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

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

LGTM! nice improvements + polish 💖

k = 1;
centered = null;
}

g.transition()
.duration(750)
.attr('transform', 'translate(' + slice.width() / 2 + ',' + slice.height() / 2 + ')scale(' + k + ')translate(' + -x + ',' + -y + ')');
.attr('transform', 'translate(' + width / 2 + ',' + height / 2 + ')scale(' + k + ')translate(' + -x + ',' + -y + ')');
Copy link
Contributor

Choose a reason for hiding this comment

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

could use template literals here to be consistent with transform below

const vscale = scale * height / (bounds[1][1] - bounds[0][1]);
const newScale = (hscale < vscale) ? hscale : vscale;

// Compute bounds and offset using the updated scale.
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@codecov-io
Copy link

Codecov Report

Merging #5721 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5721      +/-   ##
==========================================
- Coverage   63.78%   63.77%   -0.02%     
==========================================
  Files         364      364              
  Lines       23073    23078       +5     
  Branches     2568     2575       +7     
==========================================
  Hits        14717    14717              
- Misses       8341     8346       +5     
  Partials       15       15
Impacted Files Coverage Δ
superset/assets/src/visualizations/country_map.js 0% <0%> (ø) ⬆️

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 86f99b0...82b6855. Read the comment docs.

@kristw
Copy link
Contributor Author

kristw commented Aug 29, 2018

Used template literal and a few minor tweaks.

@williaster
Copy link
Contributor

🚢

@williaster williaster merged commit f72cdc3 into apache:master Aug 30, 2018
Embeddable Charts automation moved this from In progress to Done Aug 30, 2018
@kristw kristw deleted the kristw-country branch September 5, 2018 18:52
kristw added a commit to kristw/incubator-superset that referenced this pull request Sep 5, 2018
* Extract slice and formData

* update css indent

* remove no-effect call

* improve text label

* adjust text size

* fix bound calculation

* use string literal

* make path constant

(cherry picked from commit f72cdc3)
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
* Extract slice and formData

* update css indent

* remove no-effect call

* improve text label

* adjust text size

* fix bound calculation

* use string literal

* make path constant
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Extract slice and formData

* update css indent

* remove no-effect call

* improve text label

* adjust text size

* fix bound calculation

* use string literal

* make path constant
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 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 🚢 0.28.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants