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

refactor: 小计/总计配置重构 #2375

Merged
merged 2 commits into from
Oct 31, 2023
Merged

refactor: 小计/总计配置重构 #2375

merged 2 commits into from
Oct 31, 2023

Conversation

lijinke666
Copy link
Member

👀 PR includes

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

📝 Description

语义保持统一, 去掉一些含义模糊不清的命名

  • 有些用 totals 表示总计, 有些又用 grandTotials
  • 有些用 sub 表示小计, 有些又用 subTotals
interface Total {
- calcTotals?: CalcTotals;
+ calcGrandTotals: CalcTotals

- reverseLayout: boolean;
+ reverseGrandTotalsLayout: boolean;

- reverseSubLayout: boolean;
+ reverseSubTotalsLayout: boolean;

- label?: string;
+ grandTotalsLabel?: string;

- subLabel?: string;
+ subTotalsLabel?: string
}

TODO: 更好的方式

interface Total {
  grandTotals: {
    calc: CalcTotals,
	reverseLayout: boolean;
    label: string;
    dimensions: string[]
  },
  subTotals: {
    calc: CalcTotals,
	reverseLayout: boolean;
    label: string;
    dimensions: string[]
  }
}

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

@vercel
Copy link

vercel bot commented Oct 19, 2023

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

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Oct 19, 2023 3:50am

@github-actions github-actions bot added the pr(refactor) refactor label Oct 19, 2023
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Oct 19, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 19, 2023

Size Change: +24 B (0%)

Total Size: 320 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 226 kB +24 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 401 B
./packages/s2-react/dist/index.min.js 67 kB
./packages/s2-react/dist/style.min.css 3.92 kB
./packages/s2-vue/dist/index.min.js 20.2 kB
./packages/s2-vue/dist/style.min.css 1.91 kB

compressed-size-action

@github-actions
Copy link
Contributor

你好, @lijinke666 CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @lijinke666 CI run failed, please click the [Details] button for detailed log information and fix it.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Oct 19, 2023
@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label Oct 27, 2023
@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ecdc9c8) 75.77% compared to head (150f116) 76.82%.
Report is 206 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2375      +/-   ##
==========================================
+ Coverage   75.77%   76.82%   +1.05%     
==========================================
  Files         257      268      +11     
  Lines       11994    12188     +194     
  Branches     2464     2482      +18     
==========================================
+ Hits         9088     9363     +275     
+ Misses       1398     1286     -112     
- Partials     1508     1539      +31     
Files Coverage Δ
packages/s2-core/src/cell/base-cell.ts 83.85% <ø> (-0.36%) ⬇️
packages/s2-core/src/cell/col-cell.ts 88.80% <ø> (+2.04%) ⬆️
packages/s2-core/src/cell/corner-cell.ts 81.00% <ø> (-1.70%) ⬇️
packages/s2-core/src/cell/data-cell.ts 76.12% <ø> (+9.46%) ⬆️
packages/s2-core/src/cell/header-cell.ts 63.69% <ø> (-2.13%) ⬇️
packages/s2-core/src/cell/index.ts 100.00% <ø> (ø)
packages/s2-core/src/cell/merged-cell.ts 91.66% <ø> (+54.16%) ⬆️
packages/s2-core/src/cell/row-cell.ts 71.42% <ø> (+0.62%) ⬆️
packages/s2-core/src/cell/series-number-cell.ts 90.90% <ø> (-2.20%) ⬇️
packages/s2-core/src/cell/table-col-cell.ts 84.61% <ø> (+3.48%) ⬆️
... and 98 more

... and 73 files with indirect coverage changes

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

@lijinke666 lijinke666 merged commit 5131feb into next Oct 31, 2023
7 of 8 checks passed
@lijinke666 lijinke666 deleted the refactor-totals-api branch October 31, 2023 09:14
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-react-v2.0.0-next.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(refactor) refactor released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants