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: Table sorting reset #23318

Merged
merged 6 commits into from
Mar 15, 2023
Merged

fix: Table sorting reset #23318

merged 6 commits into from
Mar 15, 2023

Conversation

geido
Copy link
Member

@geido geido commented Mar 9, 2023

SUMMARY

Fixes an issue for which the table would reset sorting when filtered. The sorting is now kept unless the columns of the Table change.

This PR also moves the most common hooks to superset-ui-core for reusability.

AFTER

Tables.mp4

TESTING INSTRUCTIONS

  1. Add one table to the dashboard
  2. Set the sorting of the table
  3. Filter the table
  4. Make sure sorting is kept

ADDITIONAL INFORMATION

  • Has associated issue: Fixes Cross-filtering resets the table column sorting #22691
  • 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 Mar 9, 2023

Codecov Report

Merging #23318 (b04e422) into master (24c472a) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head b04e422 differs from pull request most recent head 36674ab. Consider uploading reports for the commit 36674ab to get more accurate results

@@            Coverage Diff             @@
##           master   #23318      +/-   ##
==========================================
+ Coverage   67.53%   67.56%   +0.03%     
==========================================
  Files        1907     1907              
  Lines       73473    73475       +2     
  Branches     7976     7977       +1     
==========================================
+ Hits        49617    49642      +25     
+ Misses      21807    21785      -22     
+ Partials     2049     2048       -1     
Flag Coverage Δ
javascript 53.80% <100.00%> (+0.06%) ⬆️

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

Impacted Files Coverage Δ
...-core/src/hooks/useChangeEffect/useChangeEffect.ts 100.00% <ø> (ø)
...hooks/useComponentDidMount/useComponentDidMount.ts 100.00% <ø> (ø)
...oks/useComponentDidUpdate/useComponentDidUpdate.ts 100.00% <ø> (ø)
...src/hooks/useElementOnScreen/useElementOnScreen.ts 100.00% <ø> (ø)
...erset-ui-core/src/hooks/usePrevious/usePrevious.ts 100.00% <ø> (ø)
...re/src/hooks/useTruncation/useCSSTextTruncation.ts 100.00% <ø> (ø)
...c/hooks/useTruncation/useChildElementTruncation.ts 100.00% <ø> (ø)
...d/src/SqlLab/components/AceEditorWrapper/index.tsx 59.25% <ø> (ø)
...frontend/src/SqlLab/components/ResultSet/index.tsx 62.65% <ø> (ø)
...rontend/src/components/DropdownContainer/index.tsx 65.00% <ø> (ø)
... and 27 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Tested, works great!

@geido geido merged commit da3791a into master Mar 15, 2023
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the fix/cross-filtering-table-sort branch March 26, 2024 16:11
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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-filtering resets the table column sorting
4 participants