[pull] main from MetaMask:main#27
Merged
Merged
Conversation
…#17579) ## **Description** This PR introduces a new **ButtonHero** component built with the MetaMask Design System and Tailwind CSS. The component extends ButtonBase functionality with primary color theming, designed for prominent call-to-action buttons with consistent styling and proper accessibility support. **What is the reason for the change?** We needed a hero-style button component that uses the primary color scheme with proper pressed states for prominent CTAs in the MetaMask Mobile app, following the design system guidelines while working within ButtonBase constraints. **What is the improvement/solution?** - Created ButtonHero component extending ButtonBaseProps from @metamask/design-system-react-native - Implemented primary color theming (bg-primary-default → bg-primary-default-pressed) - Used useTailwind hook with performance optimizations (useCallback for textClassName) - Added comprehensive tests covering core functionality and ButtonBase behavior - Created Storybook stories with Default, IsDisabled, and IsLoading states - Ensured full TypeScript support and proper prop spreading - Identified and documented ButtonBase API issues for upstream fixes - Used proper design system patterns while working around current limitations ## **Changelog** CHANGELOG entry: null ## **Related issues** Part of: https://consensyssoftware.atlassian.net/browse/DSYS-24 ## **Manual testing steps** 1. Import the ButtonHero component: `import ButtonHero from 'app/component-library/components-temp/Buttons/ButtonHero'` 2. Use the component: `<ButtonHero onPress={() => console.log('pressed')}>Get Started</ButtonHero>` 3. Test different states in Storybook: - Default: `<ButtonHero>Action</ButtonHero>` - Loading: `<ButtonHero isLoading loadingText="Loading...">Action</ButtonHero>` - Disabled: `<ButtonHero isDisabled>Action</ButtonHero>` 4. Test with additional props: - Custom style: `<ButtonHero style={{marginTop: 20}}>Styled</ButtonHero>` - Icons: `<ButtonHero startIconName={IconName.Add}>With Icon</ButtonHero>` - Accessibility: `<ButtonHero accessibilityLabel="Custom label">Accessible</ButtonHero>` 5. Verify primary blue background color and white text 6. Test pressed state shows primary-default-pressed color 7. Run tests: `yarn jest app/component-library/components-temp/Buttons/ButtonHero` ## **Screenshots/Recordings** ### Before N/A no ButtonHero component ### After https://github.com/user-attachments/assets/ba0434b3-5caf-464a-81ec-b6aa13105809 ## **Technical Notes** **Performance Optimizations:** - Uses `useCallback` for textClassName to prevent unnecessary re-renders - Proper prop spreading maintains ButtonBase performance characteristics **Design System Issues Identified:** - ButtonBase textClassName API forces function creation for static values - Loading state shows both loading text and children (potential bug) - These issues are documented for upstream design system team **Test Coverage:** - 5 focused tests covering core functionality - Tests work around ButtonBase behavior quirks - Validates prop spreading, styling, and state management ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile-coding-standards) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)) - [x] I've properly set the pull request status: - [x] In case it's not yet "ready for review", I've set it to "draft" - [x] In case it's "ready for review", I've changed it from "draft" to "ready for review" ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed) - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket - [ ] I confirm that I've run the tests locally and they pass - [ ] Code style is consistent with the rest of the codebase - [ ] I've approved the PR
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR added the AssetDetailsActions from the Tokens Detail to the Wallet page <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** `CHANGELOG entry: Added main trading buttons to the Wallet homepage` <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to Wallet 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** When Unified UI is not available https://github.com/user-attachments/assets/d58bbac6-f7bb-45bd-ba89-0e3ac48eff5b When Unified UI is available https://github.com/user-attachments/assets/df3c1259-c68e-4975-babc-a7bd2daadd26 <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: cmd-ob <ola.bale@consensys.net>
## **Description** This pr adds the `MultichainAccountsService` initialization. This service when its integrated with the account tree controller, will introduce new APIs for account creation and discovery and would unify these flows between evm and non evm accounts. ([Feature documentation.](https://www.notion.so/metamask-consensys/Multichain-Accounts-Architecture-20df86d67d6880f391aecdb7559f6979)) ## **Changelog** CHANGELOG entry: adds the MultichainAccountsService. ## **Related issues** - MetaMask/metamask-extension#34178 ## **Manual testing steps** 1. Load your app as usual 2. Nothing should break, this service isn't used yet ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Charly Chevalier <charlyy.chevalier@gmail.com>
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> Adds a bottom sheet modal to for unsupported states that can direct users to change their state or buy from the aggregator. https://github.com/user-attachments/assets/e1741968-b1d5-4e98-b76d-c1da995d1f48 ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.3)
Can you help keep this open source service alive? 💖 Please sponsor : )