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): Invalid d3Formatter on String column #23515

Merged

Conversation

justinpark
Copy link
Member

@justinpark justinpark commented Mar 28, 2023

SUMMARY

regression from #17336
column_config applied the d3NumberFormat to all columns including STRING column, the string column value has been converted to 'NaN' due to invalid formatter.
When dnd column is disabled, there's no option to customize the format for a column.

This commit replaces numberFormat to apply for Number column only.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
Screenshot 2023-03-28 at 2 06 15 PM

Before:

Screenshot 2023-03-28 at 2 05 27 PM

TESTING INSTRUCTIONS

Create a Table chart and apply the d3NumberFormat

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: @ktmud @michael-s-molina

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Mar 28, 2023

Codecov Report

Merging #23515 (870dcbb) into master (21578f7) will increase coverage by 0.02%.
The diff coverage is 33.33%.

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

@@            Coverage Diff             @@
##           master   #23515      +/-   ##
==========================================
+ Coverage   67.63%   67.65%   +0.02%     
==========================================
  Files        1910     1910              
  Lines       73746    73746              
  Branches     7987     7987              
==========================================
+ Hits        49876    49892      +16     
+ Misses      21829    21813      -16     
  Partials     2041     2041              
Flag Coverage Δ
javascript 53.85% <33.33%> (+<0.01%) ⬆️

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

Impacted Files Coverage Δ
...t-ui-chart-controls/src/shared-controls/mixins.tsx 16.66% <ø> (ø)
...s/superset-ui-core/src/components/SafeMarkdown.tsx 66.66% <ø> (ø)
...plugins/legacy-plugin-chart-heatmap/src/Heatmap.js 0.00% <0.00%> (ø)
.../src/explore/components/ControlPanelsContainer.tsx 69.76% <0.00%> (ø)
...d/plugins/plugin-chart-table/src/transformProps.ts 64.83% <100.00%> (+0.39%) ⬆️

... and 5 files with indirect coverage changes

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

@justinpark justinpark merged commit 5d910aa into apache:master Mar 28, 2023
justinpark added a commit to airbnb/superset-fork that referenced this pull request Apr 5, 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
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/S 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants