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(plugin-chart-table): sort alphanumeric columns case insensitive #17765

Merged
merged 1 commit into from
Dec 15, 2021

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Dec 15, 2021

SUMMARY

This PR makes sorting of alphanumeric columns case insensitive.

Order of sorting before (ascending):

  1. Non-letter characters (.!, etc.), undefined, null
  2. Capital letters A-Z
  3. Lowercase letters a-z
  4. Numbers

Order of sorting after (ascending):

  1. Non-letter characters (.!, etc.), undefined, null
  2. Numbers
  3. Letters case insensitive Aa-Zz

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2021-12-15.at.17.03.55.mov

After:

Screen.Recording.2021-12-15.at.16.58.59.mov

TESTING INSTRUCTIONS

  1. Create a table chart with alphanumeric columns
  2. Verify that sorting is case insensitive

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

CC @rusackas
https://app.shortcut.com/preset/story/25784/column-sort-should-be-case-insensitive

@codecov
Copy link

codecov bot commented Dec 15, 2021

Codecov Report

Merging #17765 (cc1d47a) into master (124af4c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #17765   +/-   ##
=======================================
  Coverage   67.71%   67.72%           
=======================================
  Files        1604     1605    +1     
  Lines       64186    64195    +9     
  Branches     6786     6789    +3     
=======================================
+ Hits        43464    43473    +9     
  Misses      18867    18867           
  Partials     1855     1855           
Flag Coverage Δ
javascript 54.82% <100.00%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...ins/plugin-chart-table/src/DataTable/DataTable.tsx 38.54% <100.00%> (+0.64%) ⬆️
...DataTable/utils/sortAlphanumericCaseInsensitive.ts 100.00% <100.00%> (ø)

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 124af4c...cc1d47a. Read the comment docs.

@kgabryje
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM! Works, too!

@rusackas rusackas merged commit 82b47ca into apache:master Dec 15, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 size/L 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants