superset icon indicating copy to clipboard operation
superset copied to clipboard

fix(plugin-chart-handlebars): Sort-By and Sort-By-Descending control not work

Open stephenLYZ opened this issue 2 years ago • 1 comments

SUMMARY

This PR fixes the problem that sort-by control not working in the handlebar chart.

  • use normalizeOrderBy to normalize the value of sort-by control
  • only make sort-descending control visible when sort-by control has values
  • change the order of the sort-descending control

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

https://user-images.githubusercontent.com/11830681/183296046-84ef54aa-b0d1-49be-bd88-9e02954c6c1b.mov

after

https://user-images.githubusercontent.com/11830681/183295934-1147a537-1ab5-4dcb-a922-8db70e272700.mov

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

stephenLYZ avatar Aug 07 '22 14:08 stephenLYZ

Codecov Report

Merging #21005 (4ceac51) into master (e214e1a) will decrease coverage by 0.00%. The diff coverage is 33.33%.

@@            Coverage Diff             @@
##           master   #21005      +/-   ##
==========================================
- Coverage   66.34%   66.34%   -0.01%     
==========================================
  Files        1767     1767              
  Lines       67312    67313       +1     
  Branches     7144     7144              
==========================================
  Hits        44656    44656              
- Misses      20828    20830       +2     
+ Partials     1828     1827       -1     
Flag Coverage Δ
javascript 52.11% <33.33%> (-0.01%) :arrow_down:

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

Impacted Files Coverage Δ
...lugin-chart-handlebars/src/plugin/controlPanel.tsx 50.00% <ø> (ø)
...n-chart-handlebars/src/plugin/controls/orderBy.tsx 28.57% <0.00%> (-11.43%) :arrow_down:
...s/plugin-chart-handlebars/src/plugin/buildQuery.ts 100.00% <100.00%> (+25.00%) :arrow_up:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov[bot] avatar Aug 07 '22 15:08 codecov[bot]

/testenv up

rusackas avatar Aug 16 '22 04:08 rusackas

I have a handlebars chart I'll test this with asap...

rusackas avatar Aug 16 '22 04:08 rusackas

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

github-actions[bot] avatar Aug 16 '22 04:08 github-actions[bot]

Ephemeral environment shutdown and build artifacts deleted.

github-actions[bot] avatar Aug 22 '22 07:08 github-actions[bot]