-
Notifications
You must be signed in to change notification settings - Fork 399
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
[SDK] Add onClose callback to details modal #5605
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 99cc2f5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5605 +/- ##
==========================================
- Coverage 51.53% 51.41% -0.13%
==========================================
Files 1094 1097 +3
Lines 57592 57716 +124
Branches 4755 4758 +3
==========================================
- Hits 29681 29674 -7
- Misses 27193 27327 +134
+ Partials 718 715 -3
*This pull request uses carry forward flags. Click here to find out more.
|
4e1ad8d
to
a1ddcc2
Compare
a1ddcc2
to
d15a998
Compare
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.
LGTM but I'm a little confused how this solves the original issue, also why we need the screen
param to be passed to onClose
(feels like something a little too internal to be exposing). I trust though
a9d7d06
to
3a9de42
Compare
3a9de42
to
c90ebc1
Compare
packages/thirdweb/src/react/web/ui/prebuilt/Chain/icon.test.tsx
Outdated
Show resolved
Hide resolved
c90ebc1
to
bbb3ab1
Compare
```tsx | ||
<ConnectButton | ||
detailsModal={{ | ||
onClose: (screen: string) => { |
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.
Rather than burying this in the detailsModal
prop, could we make it top level?
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.
Remove screen param at least
bbb3ab1
to
f1d4fd5
Compare
f1d4fd5
to
99cc2f5
Compare
/** | ||
* @internal | ||
*/ | ||
export const getSrcChainIcon = (props: { |
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.
Remove 'export' keyword since getSrcChainIcon is only used internally within this file and not imported elsewhere
Spotted by Graphite Reviewer (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
@@ -0,0 +1,3 @@ | |||
import { describe } from "vitest"; | |||
|
|||
describe.runIf(process.env.TW_SECRET_KEY)("ChainIcon-legacy", () => {}); |
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.
Remove the empty legacy test suite since it's not being used and there are already comprehensive tests in place for the ChainIcon component
Spotted by Graphite Reviewer (based on CI logs)
Is this helpful? React 👍 or 👎 to let us know.
CNCT-2444
CNCT-2444
PR-Codex overview
This PR focuses on enhancing the
ConnectButton
component by adding anonClose
callback for the details modal and improving theChainIcon
functionality, including test coverage and icon resolution.Detailed summary
onClose
callback toConnectButton
details modal options.fetchChainIcon
logic for better icon resolution.ChainIcon
.ChainActiveDot
component for active chain indication.DetailsModal
to utilize new callback and components.