-
Notifications
You must be signed in to change notification settings - Fork 123
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
fix(web3): connect modal connecting should not display skeleton #944
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: d3f1b07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
loading 应该不是默认 true 吧?为啥我们也会出现 loading? 如果 antd 的 modal 支持 loading,我们的 ConnectModal 最好保留这个功能,只是说 UI 上面 padding 要优化下。 |
因为我们有个对 Modal 的 Context,里面正好有个名为 loading 的属性,不幸与 antd 的重名了。 |
它的 loading 是用骨架屏实现的,跟我们的样式不太搭。 |
感觉还好啊,作为 Modal 整体的 loading,骨架屏感觉也还好 |
主要是会导致这种样式: Kapture.2024-06-11.at.11.02.46.mp4 |
为啥里面连接状态会导致外面出现 loading?那这个设计有问题,应该分开。 |
这个 loading 换成 connecting 吧,语义上就区分开。 |
packages/common/src/types.ts
Outdated
@@ -203,7 +203,7 @@ export type Balance = BalanceMetadata & { | |||
|
|||
export interface ConnectorTriggerProps { | |||
account?: Account; | |||
loading?: boolean; | |||
connecting?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个影不需要改,这个是指 按钮的 loading,应该叫 loading 是合理的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #944 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 712 712
Lines 21624 21624
Branches 1225 1225
=========================================
Hits 21624 21624 ☔ View full report in Codecov by Sentry. |
@jeasonstudio 这个看一下,今天发个版本,这个问题应该会导致开发者使用最新版本的 antd 时异常。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档是不是忘了改了
Co-authored-by: 愚指导 <yutingzhao1991@gmail.com>
ConnectModal 的文档是吗?我来补一下。 |
[中文版模板 / Chinese template]
💡 Background and solution
antd 5.18.0 的 Modal 新增了 loading 属性,会展示骨架屏,与 ConnectModal UI 冲突,需要特殊处理下。
![image](https://private-user-images.githubusercontent.com/18319675/338412741-a5045f2b-7913-4ca7-b70f-c93be7891875.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIxMjg5NjQsIm5iZiI6MTcyMjEyODY2NCwicGF0aCI6Ii8xODMxOTY3NS8zMzg0MTI3NDEtYTUwNDVmMmItNzkxMy00Y2E3LWI3MGYtYzkzYmU3ODkxODc1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI4VDAxMDQyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwZDlhNDUwMWIxNGJjZjBiZWUxNzI0ZmE1ODY3ZWJhM2YzNjczN2QwMTc4NzkyMDAzOGYyY2RiYTYzNTlhNzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.5c6Dt6-C3TFI11VJYR0Q3Av3xFkNk7YYj8t5XtsPRp4)
🔗 Related issue link