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

Fixed filter removal bug #3458

Merged
merged 4 commits into from
Sep 15, 2017

Conversation

Mogball
Copy link
Contributor

@Mogball Mogball commented Sep 13, 2017

To fix issue #3429 and a few other UI bugs with the slice filter.

  • Having multiple filters then removing a filter by clicking "-" would clear the filter selections for those below on the UI
  • Due to filter selection choices stored in Filter components as state, which are not updated when removing a filter
  • Changing filter operator from type of array to string or vice versa does not properly transform the currently selected values
  • Changing the filter column keeps the previously selected choices

Solutions

  • Filter choices are stored as an array in the FilterControl component state and modified as filters are added, removed, or changed
  • These choices are passed down to Filter components as props
  • When changing the filter column, the selection values are cleared as per their type (array or string)
  • Changing filter operator properly converts between array and string as needed

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 06eebae on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 13, 2017

Coverage Status

Coverage remained the same at 69.119% when pulling 5de6325 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@mistercrunch
Copy link
Member

The tests for FilterControl are pretty skinny at the moment, would you mind beefing them up a tad?
https://github.com/apache/incubator-superset/blob/master/superset/assets/spec/javascripts/explore/components/FilterControl_spec.jsx

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.112% when pulling d798f47 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.112% when pulling d798f47 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.112% when pulling d798f47 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 69.112% when pulling d798f47 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@coveralls
Copy link

coveralls commented Sep 14, 2017

Coverage Status

Coverage increased (+0.02%) to 69.14% when pulling 719c823 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 69.14% when pulling 719c823 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 69.14% when pulling 719c823 on Mogball:mogball/bugfix/slice_filters into 8223729 on apache:master.

@Mogball
Copy link
Contributor Author

Mogball commented Sep 14, 2017

Added some unit tests and increased code coverage a tad bit @mistercrunch

@mistercrunch mistercrunch merged commit dd72048 into apache:master Sep 15, 2017
@mistercrunch
Copy link
Member

img

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.20.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.20.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants