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] Refactor filterbox #5789

Merged
merged 6 commits into from
Sep 6, 2018
Merged

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Sep 1, 2018

  • Remove dependency to d3.
  • Organize variables
  • Break render function into smaller ones.
  • Update PropTypes

@codecov-io
Copy link

codecov-io commented Sep 1, 2018

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5789      +/-   ##
==========================================
- Coverage   63.73%   63.71%   -0.02%     
==========================================
  Files         366      366              
  Lines       23132    23139       +7     
  Branches     2598     2597       -1     
==========================================
  Hits        14744    14744              
- Misses       8373     8380       +7     
  Partials       15       15
Impacted Files Coverage Δ
superset/assets/src/visualizations/filter_box.jsx 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 a9952bb...c5d5066. Read the comment docs.

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! I had 2 nit comments and then one possibly more significant one.

@@ -1,5 +1,3 @@
// JS
import d3 from 'd3';
Copy link
Contributor

Choose a reason for hiding this comment

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

🔥

label={t('Time range')}
description={t('Select start and end date')}
onChange={this.changeFilter.bind(this, timeRange)}
value={this.state.selectedValues[timeRange]}
onChange={this.changeFilter.bind(this, TIME_RANGE)}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit -- could we bind this in the constructor?

<OnPasteSelect
placeholder={t('Select [%s]', filter)}
key={filter}
placeholder={t('Select [%s]', key)}
Copy link
Contributor

Choose a reason for hiding this comment

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

should this one use label instead of key?

@@ -195,21 +218,26 @@ class FilterBox extends React.Component {
};
return { value: opt.id, label: opt.id, style };
})}
onChange={this.changeFilter.bind(this, filter)}
onChange={this.changeFilter.bind(this, key)}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit -- could we bind this in the constructor?

@williaster williaster merged commit b284788 into apache:master Sep 6, 2018
@kristw kristw deleted the kristw-filterbox branch September 7, 2018 00:00
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
* reorganize variables

* bring back datasource

* refactor filter box

* rename constants to all caps and update prop types

* bind this.changeFilter

* update event handler
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* reorganize variables

* bring back datasource

* refactor filter box

* rename constants to all caps and update prop types

* bind this.changeFilter

* update event handler
@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.

4 participants