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(native-filters): Fix required filters #15572

Merged
merged 21 commits into from
Jul 12, 2021

Conversation

simcha90
Copy link
Contributor

@simcha90 simcha90 commented Jul 7, 2021

SUMMARY

This PR fix CR notes for native filters from here: #15506 (comment)

  1. Remove error message in required filters in filter bar
  2. Fix bug when reopens FiltersConfigModal with existed value it's not marked as checked
Screen.Recording.2021-07-07.at.17.54.44.mov
  1. On the way fix Range filter that doesn't apply default value in next flow:
    a. Create Select Filter
    b. Switch it's type to Range Filter

  2. Removes reset form functionality because of 2 reasons:
    a. When form saved or closed now it destroys Ant form, so no need reset it
    b. It applies reset before form closed, and it can mess some form fields before it closed

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #15572 (f421caf) into master (83be06d) will decrease coverage by 0.01%.
The diff coverage is 56.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15572      +/-   ##
==========================================
- Coverage   76.95%   76.93%   -0.02%     
==========================================
  Files         976      976              
  Lines       51290    51309      +19     
  Branches     6907     6920      +13     
==========================================
+ Hits        39468    39474       +6     
- Misses      11603    11612       +9     
- Partials      219      223       +4     
Flag Coverage Δ
javascript 71.38% <56.41%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...tersConfigModal/FiltersConfigForm/DefaultValue.tsx 20.83% <0.00%> (ø)
...eFilters/FiltersConfigModal/FiltersConfigModal.tsx 94.87% <ø> (-0.43%) ⬇️
...mponents/nativeFilters/FiltersConfigModal/utils.ts 75.00% <ø> (-0.35%) ⬇️
...filters/components/GroupBy/GroupByFilterPlugin.tsx 0.00% <0.00%> (ø)
...s/components/TimeColumn/TimeColumnFilterPlugin.tsx 0.00% <0.00%> (ø)
...ers/components/TimeGrain/TimeGrainFilterPlugin.tsx 0.00% <0.00%> (ø)
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 73.59% <45.45%> (-0.07%) ⬇️
superset-frontend/src/filters/components/common.ts 90.00% <50.00%> (-10.00%) ⬇️
...d/src/filters/components/Time/TimeFilterPlugin.tsx 86.66% <60.00%> (-5.65%) ⬇️
...c/filters/components/Select/SelectFilterPlugin.tsx 79.82% <75.00%> (-0.88%) ⬇️
... and 30 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 83be06d...f421caf. Read the comment docs.

@michael-s-molina
Copy link
Member

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2021

@michael-s-molina Ephemeral environment spinning up at http://54.201.111.35:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@apache apache deleted a comment from github-actions bot Jul 7, 2021
@michael-s-molina
Copy link
Member

Bug 1: Error adding a filter with a default value:

screen-recording-2021-07-07-at-22517-pm_tDAvgEeF.mp4

Bug 2: Time range filter is not being validated on the filter bar:

screen-recording-2021-07-07-at-23003-pm_EF6aocH7.mp4

@simcha90
Copy link
Contributor Author

simcha90 commented Jul 7, 2021

@michael-s-molina Hi thanks for review, I fixed bugs that you found and pushed fix 👍

@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Jul 7, 2021
@junlincc
Copy link
Member

junlincc commented Jul 7, 2021

thanks for addressing our comments @simcha90 really appreciate it!

@michael-s-molina
Copy link
Member

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true

@github-actions
Copy link
Contributor

github-actions bot commented Jul 8, 2021

@michael-s-molina Ephemeral environment spinning up at http://54.203.224.124:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina
Copy link
Member

The "Value is required" is still appearing...

screen-recording-2021-07-08-at-83158-am_yB19KQN0.mp4

@simcha90
Copy link
Contributor Author

simcha90 commented Jul 9, 2021

👍 my miss I will look on this on Sunday, thanks!

@michael-s-molina
Copy link
Member

👍 my miss I will look at this on Sunday, thanks!

Ok @simcha90. Let me know when it's ready for review.

@simcha90
Copy link
Contributor Author

@michael-s-molina I fixed, also on the way I fixed some other related bugs when tested this functionality, I updated them in description, thanks

@michael-s-molina
Copy link
Member

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true

@github-actions
Copy link
Contributor

@michael-s-molina Ephemeral environment spinning up at http://34.214.18.187:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

Thank you for the fixes @simcha90

@michael-s-molina michael-s-molina merged commit d70ac21 into apache:master Jul 12, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@junlincc
Copy link
Member

junlincc commented Jul 13, 2021

@simcha90 @amitmiran137 really appreciate the quick fix and informing our team for review! 🙏
cc @adam-stasiak

henryyeh pushed a commit to preset-io/superset that referenced this pull request Jul 13, 2021
* fix:fix get permission function

* fix: filters required state

* fix: fix CR notes

* fix: removre required message

* fix: fix validation state

(cherry picked from commit d70ac21)
@michael-s-molina michael-s-molina moved this from In progress to Done in Native dashboard filters Jul 29, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fix:fix get permission function

* fix: filters required state

* fix: fix CR notes

* fix: removre required message

* fix: fix validation state
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fix:fix get permission function

* fix: filters required state

* fix: fix CR notes

* fix: removre required message

* fix: fix validation state
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fix:fix get permission function

* fix: filters required state

* fix: fix CR notes

* fix: removre required message

* fix: fix validation state
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 labels Mar 12, 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 #bug:blocking! Blocking issues with high priority dashboard:native-filters Related to the native filters of the Dashboard size/L v1.3 🚢 1.3.0
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

5 participants