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-6] Migrate visualizations to new directory structure. #5949

Merged
merged 22 commits into from
Sep 27, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Sep 20, 2018

  • Add adaptor, transformProps and ReactXXX for each component
  • Apply the same approach with [SIP-6] Add reactify function and convert world map to new directory structure. #5893 to other visualizations
  • Mostly copy-pasting and cut code to new files
  • Now the structure is kinda nice because in transformProps files you can easily what happen to formData before becoming usable by the vis components. Which one are transformed. Which one are just renamed. Which one are parsed (and start to question if this is the right place where parsing should happen)

This PR is getting really big so I limited to the vis that are easy to convert (almost copy-paste) and leave the one that requires more work or needs more attention for follow-up PRs.

Included in this PR

  • Calendar
  • Chord
  • CountryMap
  • FilterBox
  • ForceDirected
  • Heatmap
  • Histogram
  • Horizon
  • PairedTTest
  • ParallelCoordinates
  • Partition
  • PivotTable
  • Rose
  • Sankey
  • Sunburst
  • Table
  • Treemap
  • WorldMap
  • WordCloud

Not included

  • BigNumber
  • MapBox
  • nvd3
  • TimeTable
  • EventFlow
  • iframe
  • markup
  • deck.gl

@williaster @conglei

@kristw kristw closed this Sep 21, 2018
@kristw kristw reopened this Sep 21, 2018
@kristw kristw closed this Sep 21, 2018
@kristw kristw reopened this Sep 21, 2018
@kristw kristw changed the title [SIP-6] Move Chord, Calendar, CountryMap to new directory structure. [SIP-6] Move Chord, Calendar, CountryMap, ForceDirected, Histogram to new directory structure. Sep 21, 2018
@kristw kristw changed the title [SIP-6] Move Chord, Calendar, CountryMap, ForceDirected, Histogram to new directory structure. [SIP-6] Migrate visualizations to new directory structure. Sep 21, 2018
@codecov-io
Copy link

codecov-io commented Sep 21, 2018

Codecov Report

Merging #5949 into master will decrease coverage by 0.06%.
The diff coverage is 9.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5949      +/-   ##
==========================================
- Coverage   63.54%   63.48%   -0.07%     
==========================================
  Files         393      443      +50     
  Lines       23654    23753      +99     
  Branches     2638     2638              
==========================================
+ Hits        15032    15080      +48     
- Misses       8609     8660      +51     
  Partials       13       13
Impacted Files Coverage Δ
...t/assets/src/visualizations/Horizon/HorizonRow.jsx 0% <ø> (ø)
...ets/src/visualizations/FilterBox/transformProps.js 0% <0%> (ø)
...erset/assets/src/visualizations/Sankey/adaptor.jsx 0% <0%> (ø)
...set/assets/src/visualizations/Sunburst/Sunburst.js 0% <0%> (ø)
...ets/src/visualizations/wordcloud/transformProps.js 0% <0%> (ø)
...src/visualizations/ParallelCoordinates/adaptor.jsx 0% <0%> (ø)
...t/assets/src/visualizations/PivotTable/adaptor.jsx 0% <0%> (ø)
...s/src/visualizations/PivotTable/ReactPivotTable.js 0% <0%> (ø)
...assets/src/visualizations/Horizon/HorizonChart.jsx 0% <0%> (ø)
...t/assets/src/visualizations/CountryMap/adaptor.jsx 0% <0%> (ø)
... and 115 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 0cc0996...5245497. Read the comment docs.

@kristw kristw force-pushed the kristw-vis-dir branch 2 times, most recently from b24be45 to 29859cd Compare September 26, 2018 23:19
Copy link
Contributor

@conglei conglei left a comment

Choose a reason for hiding this comment

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

Overall LGMT! Thanks for make the code much .learer :) just left some nitsl

} = basicChartInput;
const {
dateFilter,
groupby,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit. There are some inconsistencies on the name of groupby.In some chart, it is renamed as groupBy. it is better to make it consistent.

colorScheme,
dateTimeFormat,
equalDateSize,
groupby: groupBy,
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is one case that groupby is renamed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Will fix this.

[VIZ_TYPES.word_cloud]: () =>
loadVis(import(/* webpackChunkName: "word_cloud" */ './wordcloud/WordCloud.js')),
loadVis(import(/* webpackChunkName: "word_cloud" */ './wordcloud/adaptor.jsx')),
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also rename this to WorldCloud/adaptor.jsx ?

Copy link
Contributor Author

@kristw kristw Sep 27, 2018

Choose a reason for hiding this comment

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

Git does not handle changing lower/upper case of same string well. I will leave this out of this PR to avoid unexpected git error.

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.

agree w @conglei, lgtm!

@williaster williaster merged commit 2cd9407 into apache:master Sep 27, 2018
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
* Migrate Chord, Calendar

* Migrate CountryMap

* Add display name and rename Chord.jsx to Chord.js

* migrate Histogram

* add force-directed

* migrate Heatmap

* add horizon

* migrate parallel coordinates

* migrate partition

* migrate pivot table

* migrate rose

* remove react-dom

* migrate Sankey

* migrate sunburst

* migrate table

* migrate treemap

* migrate filterbox

* migrate wordcloud

* add paired t-test

* fix unit test

* remove renaming

* rename fields
@kristw kristw deleted the kristw-vis-dir branch November 1, 2018 21:25
@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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants