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): emitted filter label format #16828

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Sep 24, 2021

SUMMARY

The fix in #16460 didn't address the special case of numeric filter values sometimes being temporal filters. It also introduced a new util for formatting filter values whose functionality was already covered by the much more comprehensive getDataRecordFormatter factory function, which also handles time and number formatting. The redundant formatter is removed and replaced by getDataRecordFormatter which was already being used for formatting the options in the Select component. This will ensure that the filter indicator displays identical values as the Select component.

Closes #16808

AFTER

image

BEFORE

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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 Sep 24, 2021

Codecov Report

Merging #16828 (4d5a502) into master (c933250) will increase coverage by 0.00%.
The diff coverage is 100.00%.

❗ Current head 4d5a502 differs from pull request most recent head b60bd14. Consider uploading reports for the commit b60bd14 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##           master   #16828   +/-   ##
=======================================
  Coverage   76.99%   77.00%           
=======================================
  Files        1018     1018           
  Lines       54668    54660    -8     
  Branches     7456     7452    -4     
=======================================
- Hits        42094    42091    -3     
+ Misses      12329    12324    -5     
  Partials      245      245           
Flag Coverage Δ
javascript 71.09% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
superset-frontend/src/filters/utils.ts 93.33% <ø> (+8.14%) ⬆️
...c/filters/components/Select/SelectFilterPlugin.tsx 81.11% <100.00%> (+0.21%) ⬆️

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 c933250...b60bd14. Read the comment docs.

@villebro
Copy link
Member Author

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DASHBOARD_NATIVE_FILTERS_SET=true FEATURE_DASHBOARD_FILTERS_EXPERIMENTAL=true

@github-actions
Copy link
Contributor

@villebro Ephemeral environment spinning up at http://54.184.7.171:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@stephenLYZ
Copy link
Member

LGTM!

Copy link
Member

@jinghua-qa jinghua-qa left a comment

Choose a reason for hiding this comment

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

LGTM
Screen Shot 2021-09-24 at 10 51 54 AM

@zhaoyongjie zhaoyongjie self-requested a review September 27, 2021 06:35
Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks for the fix.

@villebro villebro merged commit 0a8d0c6 into apache:master Sep 27, 2021
@villebro villebro deleted the villebro/nf-indicator-format branch September 27, 2021 06:37
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@sadpandajoe
Copy link
Contributor

🏷️ 2021.38

stevenuray pushed a commit to preset-io/superset that referenced this pull request Sep 27, 2021
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 labels Mar 13, 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 preset:2021.38 preset-io size/M 🚢 1.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[native filter] datetime data in value filter is not readable in filter indicator
6 participants