-
Notifications
You must be signed in to change notification settings - Fork 46
refactor(ui): change the ui-bottom-sheet to a controlled component #766
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
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ⛔ Deployment terminated View logs |
samui-wallet-web | 17351ae | Commit Preview URL Branch Preview URL |
Dec 16 2025, 09:29 AM |
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.
Important
Looks good to me! 👍
Reviewed everything up to e6a0c15 in 48 seconds. Click for details.
- Reviewed
305lines of code in5files - Skipped
0files when reviewing. - Skipped posting
5draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/settings/src/ui/settings-ui-export-account-secret-key-sheet.tsx:33
- Draft comment:
Good use of the ternary operator for conditional rendering. Ensure that checking readSecretKeyMutation?.data?.length correctly handles cases where an empty string might be valid. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
2. packages/settings/src/ui/settings-ui-export-account-secret-key.tsx:8
- Draft comment:
The refactored export component now lifts the open state and cleanly separates the trigger from the bottom sheet. This approach is clear and aligns with best practices. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. packages/settings/src/ui/settings-ui-export-wallet-mnemonic-sheet.tsx:33
- Draft comment:
The controlled bottom sheet for wallet mnemonic export is well implemented. Verify that the condition (readMnemonicMutation.data?.length) meets the intended behavior, especially if an empty string might occur. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. packages/settings/src/ui/settings-ui-export-wallet-mnemonic.tsx:8
- Draft comment:
The wallet mnemonic export component correctly adopts a controlled pattern by using a Fragment to group the trigger button and the sheet. This implementation looks good. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
5. packages/ui/src/components/ui-bottom-sheet.tsx:9
- Draft comment:
The UiBottomSheet component now leverages a spread of props and removes the trigger prop. This provides better control, so ensure that all consumers have been updated accordingly and consider updating documentation if needed. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_URGFAUrP4Nr99SW6
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
BundleMonFiles updated (6)
Unchanged files (92)
Total files change +249.1KB +29.38% Groups updated (3)
Final result: ✅ View report in BundleMon website ➡️ |
071cde4 to
3d4c35b
Compare
e6a0c15 to
17351ae
Compare
Description
This makes the
UiBottomSheetcomponent controlled and moves theopenstate next to the button.This is in preparation for #736 where we want to be able to trigger these sheets from a dropdown menu.
Important
Refactor
UiBottomSheetto be a controlled component and update related components to manageopenstate externally.UiBottomSheetinui-bottom-sheet.tsxto be a controlled component by removingtriggerprop and addingonOpenChangeandopenprops.SettingsUiExportAccountSecretKeyandSettingsUiExportWalletMnemonicto manageopenstate and pass it toUiBottomSheet.SettingsUiExportAccountSecretKeySheetandSettingsUiExportWalletMnemonicSheetto encapsulate bottom sheet logic for account secret key and wallet mnemonic, respectively.openstate management toSettingsUiExportAccountSecretKeyandSettingsUiExportWalletMnemoniccomponents.This description was created by
for e6a0c15. You can customize this summary. It will automatically update as commits are pushed.