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: trim string value of spaces in listview search #15175

Merged
merged 1 commit into from
Jun 15, 2021

Conversation

pkdotson
Copy link
Member

SUMMARY

This pr fixes an issue with the listview search were if a space was either at the front or end of the string it would not return any results.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before:
https://user-images.githubusercontent.com/17326228/122089466-a540d500-cdbb-11eb-811f-1b442e0dd5cb.mov

after:

Screen.Recording.2021-06-15.at.9.29.28.AM.mov

TESTING INSTRUCTIONS

Go to listviews and try searching with spaces in string

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

@nytai
Copy link
Member

nytai commented Jun 15, 2021

this approach works, but wondering if we should add it to api since it seems like this could come up in other api calls

@pkdotson
Copy link
Member Author

pkdotson commented Jun 15, 2021

this approach works, but wondering if we should add it to api since it seems like this could come up in other api calls

That was my original implementation but @evan and @suddjian, and I decided to just do it on the frontend.

@codecov
Copy link

codecov bot commented Jun 15, 2021

Codecov Report

Merging #15175 (9ba4e60) into master (82ad053) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15175      +/-   ##
==========================================
- Coverage   77.41%   77.41%   -0.01%     
==========================================
  Files         969      969              
  Lines       49918    50000      +82     
  Branches     6393     6431      +38     
==========================================
+ Hits        38645    38705      +60     
- Misses      11070    11092      +22     
  Partials      203      203              
Flag Coverage Δ
javascript 72.22% <100.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...rontend/src/components/ListView/Filters/Search.tsx 82.35% <100.00%> (ø)
superset-frontend/src/CRUD/CollectionTable.tsx 78.91% <0.00%> (-6.93%) ⬇️
...ols/DateFilterControl/components/CalendarFrame.tsx 42.85% <0.00%> (-3.30%) ⬇️
superset-frontend/src/common/components/index.tsx 98.03% <0.00%> (-1.97%) ⬇️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 68.83% <0.00%> (-1.24%) ⬇️
...perset-frontend/src/dashboard/containers/Chart.jsx 100.00% <0.00%> (ø)
...erset-frontend/src/datasource/DatasourceEditor.jsx 74.39% <0.00%> (ø)
...end/src/dashboard/components/SliceHeader/index.tsx 92.00% <0.00%> (ø)
...nd/src/dashboard/components/nativeFilters/utils.ts 56.25% <0.00%> (ø)
...mponents/nativeFilters/FiltersConfigModal/utils.ts 66.25% <0.00%> (ø)
... and 5 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 82ad053...9ba4e60. Read the comment docs.

@pkdotson pkdotson merged commit d30f3c8 into apache:master Jun 15, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@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 preset-io size/XS 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants