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

feat: 支持 antd v5 #2413

Merged
merged 8 commits into from
Nov 20, 2023
Merged

feat: 支持 antd v5 #2413

merged 8 commits into from
Nov 20, 2023

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented Nov 14, 2023

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

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

📝 Description

@antv/s2-react 升级到 antd v5, 参考: https://ant-design.antgroup.com/docs/react/migration-v5-cn

  • (break change !!!) 简化 tooltip 操作项 UI 实现, 统一使用 Menu 组件, 同时配置透传
  • 内部组件 Tooltip 操作栏使用 v5 的 menu items 写法
const s2Options = {
  tooltip: {
    operation: {
-      onClick(cell) {
-       console.log('菜单点击: ', cell);
-      },
-      menus: [
-        {
-          key: 'a-1',
-          text: '操作-1',
-          icon: 'Plus',
-          onClick(cell) {
-           console.log('操作-1', cell);
-         },
-        },
-      ]

+      menu: {
+        onClick(info, cell) {
+          console.log('菜单点击: ', info, cell);
+        },
+        items: [
+          {
+            key: 'a-1',
+            label: '操作-1',
+            icon: 'Plus',
+            onClick(info, cell) {
+              console.log('操作-1', info, cell);
+            },
+         },
+      ]
    }
  }
}
  • 优化 UI 展示 (切换指标/下钻/Tooltip/排序菜单/高级排序)
  • 优化 ts 类型, 修复 s2-react 类型无法识别 ReactNode 的问题
  • 组件层暗黑模式兼容
  • 移除 v4 废弃的配置项
  • s2-vue Tooltip 兼容新版 menu 改动
  • s2-vue 是否升级 ant-design-vue v4 ??

🖼️ Screenshot

Before After
image image
image image
image image
image image
image image
image

🔗 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.

Copy link

vercel bot commented Nov 14, 2023

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

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 20, 2023 6:44am

@github-actions github-actions bot added the pr(feature) new feature label Nov 14, 2023
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Nov 14, 2023
Copy link
Contributor

github-actions bot commented Nov 14, 2023

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

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

移除废弃组件 api, 适配新版 tooltip 样式

BREAKING CHANGE: antd v5, 组件层级样式升级
Copy link
Contributor

github-actions bot commented Nov 17, 2023

Size Change: +358 B (0%)

Total Size: 321 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 227 kB +37 B (0%)
./packages/s2-core/dist/style.min.css 402 B +1 B (0%)
./packages/s2-react/dist/index.min.js 67.4 kB +199 B (0%)
./packages/s2-react/dist/style.min.css 3.99 kB +72 B (+2%)
./packages/s2-vue/dist/index.min.js 20.2 kB -20 B (0%)
./packages/s2-vue/dist/style.min.css 1.98 kB +69 B (+4%)

compressed-size-action

@github-actions github-actions bot added the 🚨 lint failed 静态检查失败 label Nov 20, 2023
Copy link

codecov bot commented Nov 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ecdc9c8) 75.77% compared to head (04a13c0) 77.78%.
Report is 209 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2413      +/-   ##
==========================================
+ Coverage   75.77%   77.78%   +2.01%     
==========================================
  Files         257      269      +12     
  Lines       11994    12014      +20     
  Branches     2464     2426      -38     
==========================================
+ Hits         9088     9345     +257     
+ Misses       1398     1166     -232     
+ Partials     1508     1503       -5     

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

@lijinke666 lijinke666 merged commit 299c7bf into next Nov 20, 2023
7 of 8 checks passed
@lijinke666 lijinke666 deleted the feat-antd-v5 branch November 20, 2023 10:26
@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 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-vue-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(feature) new feature released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant