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-handlebars): Fix TypeError when using handlebars columns raw mode #23801

Merged
merged 2 commits into from
May 15, 2023

Conversation

fmannhardt
Copy link
Contributor

SUMMARY

As already indicated in issue #22548 there is a TypeError when using the Handlebars visualization in the raw record mode. This seems to have been caused by adding the columns as an object instead of the expected array. I have simply taken the relevant code from the table plugin and replaced the invalid code with it.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

From #22548:
afbeelding

Local testing after the fix:
afbeelding

TESTING INSTRUCTIONS

  • Load any dataset into a Handlebars chart
  • Switch to raw records query mode
  • Verify that there is no TypeError

ADDITIONAL INFORMATION

  • Has associated issue: Handlebar multiple problems #22548
  • 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

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@rusackas
Copy link
Member

Thanks for this! Running CI and pinging some additional reviewers.

@rusackas
Copy link
Member

rusackas commented May 8, 2023

This PR seems to be stuck on a failing unit test. @fmannhardt I suspect a rebase from master might fix this.

@rusackas
Copy link
Member

rusackas commented May 8, 2023

@fmannhardt This seems to be failing repeatedly on unit tests. Could be flaky tests, but I haven't investigated. You might get lucky with a rebase from master fixing it (I think there was a problematic one that was fixed) but otherwise you might need to run and debug the tests a bit locally.

@fmannhardt fmannhardt force-pushed the fix-handlebars-columns-raw-mode branch from b8537cc to fc6d026 Compare May 11, 2023 17:36
@fmannhardt
Copy link
Contributor Author

I have rebased on current master and pushed the changes.

@codecov
Copy link

codecov bot commented May 12, 2023

Codecov Report

Merging #23801 (c29aaca) into master (7a55625) will increase coverage by 0.00%.
The diff coverage is 0.00%.

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

@@           Coverage Diff           @@
##           master   #23801   +/-   ##
=======================================
  Coverage   66.54%   66.54%           
=======================================
  Files        1941     1941           
  Lines       75280    75279    -1     
  Branches     8168     8168           
=======================================
  Hits        50093    50093           
+ Misses      23098    23097    -1     
  Partials     2089     2089           
Flag Coverage Δ
javascript 54.52% <0.00%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...n-chart-handlebars/src/plugin/controls/columns.tsx 15.78% <0.00%> (+0.78%) ⬆️

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

@fmannhardt
Copy link
Contributor Author

@rusackas, the rebase seems to have done the trick.

@rusackas rusackas merged commit 422e21e into apache:master May 15, 2023
eschutho pushed a commit that referenced this pull request Jul 8, 2023
@mistercrunch mistercrunch added 🍒 2.1.1 🍒 2.1.2 🍒 2.1.3 🏷️ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.1.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XS v2.1 🍒 2.1.1 🍒 2.1.2 🍒 2.1.3 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants