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

chore(card): use styles.body instead of bodyStyle #681

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

thinkasany
Copy link
Collaborator

替换移除的api

, feialatienl Aoed -sussive eoent Liatenar sere1l-alocking touchatart cvet  Ceasiaer

Copy link

changeset-bot bot commented Mar 22, 2024

🦋 Changeset detected

Latest commit: 0c99cc4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ant-design/web3 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Mar 22, 2024

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

Name Status Preview Comments Updated (UTC)
ant-design-web3 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 22, 2024 7:59am

Copy link

github-actions bot commented Mar 22, 2024

Copy link
Collaborator

@jeasonstudio jeasonstudio left a comment

Choose a reason for hiding this comment

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

目前 antd 是作为 @ant-design/web3dependencies,并且版本支持 styles.body,基于此前提这个 PR 是没问题的。

但作为 antd 的上层封装,我们应该将 antd 作为 peerDependencies,并且做好一定的兼容,类似的项目比如 pro-components 也是这么做的:
https://github.com/ant-design/pro-components/blob/master/packages/components/package.json#L51

可以讨论下。

Copy link

codecov bot commented Mar 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6f4c55f) to head (0c99cc4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #681   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          651       651           
  Lines        17769     17769           
  Branches      1113      1113           
=========================================
  Hits         17769     17769           

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

@thinkasany
Copy link
Collaborator Author

目前 antd 是作为 @ant-design/web3dependencies,并且版本支持 styles.body,基于此前提这个 PR 是没问题的。

但作为 antd 的上层封装,我们应该将 antd 作为 peerDependencies,并且做好一定的兼容,类似的项目比如 pro-components 也是这么做的: https://github.com/ant-design/pro-components/blob/master/packages/components/package.json#L51

可以讨论下。

目前咱们这个项目立项之初就是基于 antd v5, 目前 peerDependencies 支持到5应该问题不大,如果未来antd移除了这个api,可能才需要注意这一块的兼容,我这么理解可以不。

@jeasonstudio
Copy link
Collaborator

目前 antd 是作为 @ant-design/web3dependencies,并且版本支持 styles.body,基于此前提这个 PR 是没问题的。
但作为 antd 的上层封装,我们应该将 antd 作为 peerDependencies,并且做好一定的兼容,类似的项目比如 pro-components 也是这么做的: https://github.com/ant-design/pro-components/blob/master/packages/components/package.json#L51
可以讨论下。

目前咱们这个项目立项之初就是基于 antd v5, 目前 peerDependencies 支持到5应该问题不大,如果未来antd移除了这个api,可能才需要注意这一块的兼容,我这么理解可以不。

我看文档,styles.body 这个属性是 >= 5.14.0 版本才有的,这个 PR 合并后就要求用户环境的 antd 都要大于这个版本。目前 peerDependencies 声明的是 >=5.0.0,与实际不相符。
另外我们也不太希望限制 antd 到太高的版本,理论上越低越好,考虑到 roi 兼容到 v5.0 是比较合适的

@gin-lsl
Copy link
Collaborator

gin-lsl commented Mar 22, 2024

这个 pr 改的是 demo 里面的代码

@thinkasany
Copy link
Collaborator Author

这个 pr 改的是 demo 里面的代码

但是感觉给用户推荐一个demo,结果人家运行的时候 还有一个废弃的 warn 感觉怪怪的。不过也的确是替换了之后对版本要求有点高。

@kiner-tang kiner-tang merged commit be48645 into ant-design:main Mar 22, 2024
8 checks passed
@kiner-tang
Copy link
Member

这个 pr 改的是 demo 里面的代码

但是感觉给用户推荐一个demo,结果人家运行的时候 还有一个废弃的 warn 感觉怪怪的。不过也的确是替换了之后对版本要求有点高。

官方 demo 尽量给用户最正确的引导

@yutingzhao1991
Copy link
Collaborator

目前 antd 是作为 @ant-design/web3dependencies,并且版本支持 styles.body,基于此前提这个 PR 是没问题的。

但作为 antd 的上层封装,我们应该将 antd 作为 peerDependencies,并且做好一定的兼容,类似的项目比如 pro-components 也是这么做的:
https://github.com/ant-design/pro-components/blob/master/packages/components/package.json#L51

可以讨论下。

pro 这么做是为了兼容 antd4,我们应该不需要

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants