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(@cubejs-client/vue): Pivot config can use null from heuristics #7167

Merged

Conversation

DPHonys
Copy link
Contributor

@DPHonys DPHonys commented Sep 24, 2023

Check List

  • Tests has been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

Issue Reference this PR resolves

[#7166] Vue package ignores null value after herusictics

  • Fixes this bug I've made an issue on. Where the Vue frontend package totally ignores null / undefined from defaultHerusictics method so the pivot config is not correctly updated and it behaves differently from it's React counterpart.

Description of Changes Made (if issue reference is not provided)

  • The only thing I've changed is that now we check if the value of the pivot config returned from defaultHerusictics is undefined then we pass the current pivot config but if it is null then we pass the null into the ResultSet.getNormalizedPivotConfig method.

@DPHonys DPHonys requested a review from a team as a code owner September 24, 2023 08:01
@vercel
Copy link

vercel bot commented Sep 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

8 Ignored Deployments
Name Status Preview Comments Updated (UTC)
examples-angular-dashboard ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-d3 ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-dashboard ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-data-table ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-highcharts ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-material-ui ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-react-pivot-table ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm
examples-vue-query-builder ⬜️ Ignored (Inspect) Visit Preview Sep 28, 2023 10:34pm

@github-actions github-actions bot added the pr:community Contribution from Cube.js community members. label Sep 24, 2023
@codecov
Copy link

codecov bot commented Sep 24, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (a32b619) 71.16% compared to head (a30f53b) 47.04%.
Report is 11 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #7167       +/-   ##
===========================================
- Coverage   71.16%   47.04%   -24.13%     
===========================================
  Files         322      155      -167     
  Lines       53630    20749    -32881     
  Branches     5216     5216               
===========================================
- Hits        38165     9761    -28404     
+ Misses      15148    10669     -4479     
- Partials      317      319        +2     
Flag Coverage Δ
cube-backend 47.04% <ø> (ø)
cubesql ?

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

see 169 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@paveltiunov
Copy link
Member

@DPHonys Thanks for contributing! Could you please add a test for it?

@DPHonys
Copy link
Contributor Author

DPHonys commented Sep 28, 2023

Hi @paveltiunov, after multiple hours of getting empty pivotConfig I've found out I needed to use $nextTick to get updated properties so I hope the test is correctly composed. 🙂

@DPHonys
Copy link
Contributor Author

DPHonys commented Sep 28, 2023

@paveltiunov Also added the same fix and test to the Vue3 package. 🙂

…ery - Correctly updates pivot config after chart type change
@DPHonys DPHonys force-pushed the fix-client-vue-builder-pivot-config branch from 0598608 to a30f53b Compare September 28, 2023 22:33
@vasilev-alex vasilev-alex merged commit e7043bb into cube-js:master Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:community Contribution from Cube.js community members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants