Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

feat(plugin-chart-table): add small number formatter #1028

Merged
merged 2 commits into from
Mar 29, 2021

Conversation

ktmud
Copy link
Contributor

@ktmud ktmud commented Mar 27, 2021

🐛 Bug Fix

Realized I didn't commit the changes about small number formatter before merging... #1019

@ktmud ktmud requested a review from a team as a code owner March 27, 2021 00:56
@vercel
Copy link

vercel bot commented Mar 27, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/superset/superset-ui/5KPm1nizLVGomDPcH3vWNjUB5cvR
✅ Preview: https://superset-ui-git-table-column-formatting-superset.vercel.app

@codecov
Copy link

codecov bot commented Mar 27, 2021

Codecov Report

Merging #1028 (10b5035) into master (216591a) will increase coverage by 0.05%.
The diff coverage is 48.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1028      +/-   ##
==========================================
+ Coverage   27.69%   27.74%   +0.05%     
==========================================
  Files         427      427              
  Lines        8746     8758      +12     
  Branches     1311     1314       +3     
==========================================
+ Hits         2422     2430       +8     
- Misses       6151     6155       +4     
  Partials      173      173              
Impacted Files Coverage Δ
...controls/src/components/InfoTooltipWithTrigger.tsx 100.00% <ø> (ø)
...perset-ui-chart-controls/src/components/Select.tsx 9.09% <0.00%> (-2.68%) ⬇️
...lugins/plugin-chart-table/src/utils/formatValue.ts 66.66% <ø> (ø)
.../plugin-chart-table/src/utils/DateWithFormatter.ts 66.66% <25.00%> (+3.03%) ⬆️
plugins/plugin-chart-table/src/TableChart.tsx 50.00% <50.00%> (ø)
...trols/components/ColumnConfigControl/constants.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 216591a...10b5035. Read the comment docs.

if (this.formatter === String) {
return String(this.input);
}
return this.formatter ? this.formatter(this) : Date.toString.call(this);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

While this code works in production, somehow it doesn't work in the dev mode of Storybook. Moving to instance in constructor to make sure it works in both cases.

@ktmud
Copy link
Contributor Author

ktmud commented Mar 27, 2021

@kristw do you mind stamping this as well?

Copy link
Contributor

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

lgtm!

@ktmud ktmud merged commit 8b54539 into master Mar 29, 2021
@delete-merged-branch delete-merged-branch bot deleted the table-column-formatting branch March 29, 2021 23:19
NejcZdovc pushed a commit to blotoutio/superset-ui that referenced this pull request Apr 20, 2021
…#1028)

* feat(plugin-chart-table): add small number formatter

* Fix basic storybook
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants