-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: add quote details card component to Bridge UI #14264
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
feat: add quote details card component to Bridge UI #14264
Conversation
This commit introduces the QuoteInfoModal component, which includes its styles and test cases. The modal displays quote information and allows users to navigate back when the footer or header close button is pressed.
This commit introduces slippage management functionality in the Bridge component. The SlippageModal now utilizes Redux for state management, allowing users to set and apply slippage values. The implementation includes updates to the BridgeView and SlippageModal components, ensuring a seamless user experience. Additionally, tests have been added to verify the new functionality.
This commit introduces the QuoteDetailsCard component to the Bridge UI, enhancing the user experience by displaying detailed quote information. The component includes features such as expandable content for price impact and slippage settings. Additionally, mock data and tests have been added to ensure functionality and maintainability.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
Pull Request Overview
This PR introduces a new QuoteDetailsCard component to enhance the Bridge UI by displaying detailed quote information along with features such as expandable content for price impact and slippage settings, as well as adding relevant tests and updating redux state management.
- Added QuoteDetailsCard and its related styles, types, and tests.
- Updated existing Bridge UI components and redux slices to integrate slippage functionality.
- Provided new mocks and updated routes for the quote info modal and slippage modal.
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
app/components/UI/Bridge/components/QuoteInfoModal/*.tsx | Added modal and corresponding tests for displaying quote info. |
app/components/UI/Bridge/components/QuoteDetailsCard/*.ts?(x) | Introduced QuoteDetailsCard with expandable sections and tests. |
app/core/redux/slices/bridge/*.ts | Updated redux slice and tests to support slippage state. |
app/components/UI/Bridge/index.tsx | Integrated QuoteDetailsCard and removed redundant state code. |
app/components/UI/Bridge/components/SlippageModal/*.tsx | Revised SlippageModal to use redux for updating slippage state. |
Other supporting files (mocks, routes) | Minor updates and exports to support new modal and component. |
Files not reviewed (3)
- app/components/UI/Bridge/mocks/mock-quotes-native-erc20.json: Language not supported
- app/components/UI/Bridge/components/QuoteInfoModal/snapshots/QuoteInfoModal.test.tsx.snap: Language not supported
- locales/languages/en.json: Language not supported
app/components/UI/Bridge/components/QuoteDetailsCard/QuoteDetailsCard.tsx
Outdated
Show resolved
Hide resolved
The navigation has been updated to ensure seamless access to the modal from the QuoteDetailsCard component.
|
This update improves the QuoteDetailsCard component by integrating network information display, allowing users to see the source and destination networks for quotes. The component now utilizes Redux selectors for source and destination tokens, ensuring accurate chain ID representation. Additionally, the layout has been adjusted for better responsiveness, and tests have been updated to reflect these changes.
d7aa8a1
to
19955c1
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.
Looking good!
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.
UI LGTM! I would suggest getting an approval from other @MetaMask/mobile-devs that are familiar with mocking state 🙏
373a599
|
|
29839a6
|
Description
This PR introduces a new QuoteDetailsCard component to enhance the Bridge UI by displaying detailed quote information along with features such as expandable content for price impact and slippage settings, as well as adding relevant tests and updating redux state management.
Key Components Added
1. QuoteDetailsCard
2. SlippageModal (Updated)
Related issues
Fixes: MMS-1985
Manual testing steps
Screenshots/Recordings
Bridge_quoteDetails_Card_component.mp4
Pre-merge author checklist
Pre-merge reviewer checklist