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(select): make to consider the case sensitive in case of d3 format selector #19159

Merged
merged 3 commits into from
Mar 17, 2022

Conversation

prosdev0107
Copy link
Contributor

@prosdev0107 prosdev0107 commented Mar 15, 2022

SUMMARY

d3 format selection widgets should use case sensitive matching for determining uniqueness #17716

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

BEFORE:
image

AFTER:
image

TESTING INSTRUCTIONS

How to reproduce the bug

  1. Go to 'explore'
  2. Create a new 'Time-series Line Chart' (or similar)
  3. Click on the 'CUSTOMIZE' tab
  4. Try entering the '%b %Y' d3 format for the X-Axis TIME FORMAT (or some other format which matches in a case insensitive way)
  5. See that the UI component senses this is a match with '%B %Y' even though these are different

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

@ktmud
Copy link
Member

ktmud commented Mar 15, 2022

Instead of adding yet another config option, how about just passing filterOption as a function?

  filterOption: (search, option) => option.label.includes(search) || option.value.includes(search)

@pull-request-size pull-request-size bot added size/M and removed size/S labels Mar 15, 2022
@prosdev0107
Copy link
Contributor Author

@ktmud
I passed the filterOption instead of any new option. Resolved!

@codecov
Copy link

codecov bot commented Mar 17, 2022

Codecov Report

Merging #19159 (c6a3966) into master (cfb967f) will decrease coverage by 0.00%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##           master   #19159      +/-   ##
==========================================
- Coverage   66.73%   66.73%   -0.01%     
==========================================
  Files        1668     1668              
  Lines       64271    64273       +2     
  Branches     6496     6498       +2     
==========================================
  Hits        42894    42894              
- Misses      19695    19697       +2     
  Partials     1682     1682              
Flag Coverage Δ
javascript 51.31% <28.57%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...et-ui-chart-controls/src/shared-controls/index.tsx 37.25% <28.57%> (-0.75%) ⬇️

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 cfb967f...c6a3966. Read the comment docs.

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.

LGTM

@ktmud ktmud merged commit d099f5e into apache:master Mar 17, 2022
villebro pushed a commit that referenced this pull request Apr 3, 2022
@mistercrunch mistercrunch added 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 lts-v1 Preset-Patch size/M 🍒 1.5.0 🍒 1.5.1 🍒 1.5.2 🍒 1.5.3 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants