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

fix(plugin-chart-table): resize and totals formatting bug #1082

Merged
merged 1 commit into from
Apr 30, 2021

Conversation

ktmud
Copy link
Contributor

@ktmud ktmud commented Apr 29, 2021

🐛 Bug Fix

Fixes two bugs:

  1. Text align was not applied to totals.
  2. Resizing window does not rereize the table chart.

Also updates the tooltip for the column width control to be more reflective of what it really is.

Before

Xnip2021-04-29_13-03-36

After

Xnip2021-04-29_13-02-23

@ktmud ktmud requested a review from a team as a code owner April 29, 2021 20:05
@vercel
Copy link

vercel bot commented Apr 29, 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/2DeZH5icwLSJeFmJcMdQ7ZxGuHAT
✅ Preview: https://superset-ui-git-table-totals-bugfix-superset.vercel.app

@codecov
Copy link

codecov bot commented Apr 29, 2021

Codecov Report

Merging #1082 (252adde) into master (6825e87) will decrease coverage by 0.00%.
The diff coverage is 31.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1082      +/-   ##
==========================================
- Coverage   27.80%   27.79%   -0.01%     
==========================================
  Files         453      453              
  Lines        9104     9108       +4     
  Branches     1416     1418       +2     
==========================================
+ Hits         2531     2532       +1     
- Misses       6381     6384       +3     
  Partials      192      192              
Impacted Files Coverage Δ
...trols/components/ColumnConfigControl/constants.tsx 100.00% <ø> (ø)
plugins/plugin-chart-table/src/i18n.ts 100.00% <ø> (ø)
plugins/plugin-chart-table/src/transformProps.ts 61.62% <ø> (ø)
...lugins/plugin-chart-table/src/utils/formatValue.ts 56.25% <0.00%> (-8.04%) ⬇️
...ins/plugin-chart-table/src/DataTable/DataTable.tsx 38.70% <16.66%> (-1.74%) ⬇️
plugins/plugin-chart-table/src/TableChart.tsx 42.98% <50.00%> (+1.60%) ⬆️

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 6825e87...252adde. Read the comment docs.

data={data}
rowCount={rowCount}
tableClassName="table table-striped table-condensed"
pageSize={pageSize}
serverPaginationData={serverPaginationData}
pageSizeOptions={pageSizeOptions}
width={width}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

{footerGroup.headers.map(column => column.render('Footer', { key: column.id }))}
</tr>
);
})}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use react-table's built-in footer support to render totals. cc @kgabryje

@ktmud ktmud merged commit 8f05a30 into master Apr 30, 2021
@delete-merged-branch delete-merged-branch bot deleted the table-totals-bugfix branch April 30, 2021 19:55
@junlincc
Copy link
Contributor

junlincc commented May 3, 2021

Thank you @ktmud @kristw for the quick fix
Heads up, we are redesigning the new customize column popover, may either enable in-place editing or integrate in Data tab.
also adding drag to resize column and conditional formatting.

@ktmud
Copy link
Contributor Author

ktmud commented May 3, 2021

That would be awesome. Thanks for the headsup.

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.

3 participants