-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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: Integrate JSX into snap notifications #27407
base: develop
Are you sure you want to change the base?
Conversation
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. |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
## **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? Previously, developers couldn't navigate to parts of the extension with the existing functionality provided to them through snaps UI 2. What is the improvement/solution? The Snaps `Link` component now checks for if the url is a MetaMask url and navigates to the proper path accordingly. ## **Screenshots/Recordings** ### **After** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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.
export enum SNAP_TRIGGER { | ||
SNAP = 'snap', | ||
} | ||
|
||
export const TRIGGER_TYPES = { | ||
...NotificationServicesController.Constants.TRIGGER_TYPES, | ||
...SNAP_TRIGGER, | ||
}; | ||
|
||
export type TRIGGER_TYPES = | ||
| NotificationServicesController.Constants.TRIGGER_TYPES | ||
| SNAP_TRIGGER; |
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.
Adjusting types here to accommodate for snaps, these will be adjusted upstream in a later PR.
## **Description This PR adds support for the `size` prop to the `Heading` component. Right now `md` is bind to `headingMd`, `lg` is bind to `headingLg` to match https://www.figma.com/design/2cqqTWJKoHcjYVGfNXxLbQ/Beyond-Ethereum?node-id=3458-5041&node-type=text&m=dev as requested by @eriknson. The default behavior if `size` is not defined si `headingSm` [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/27721?quickstart=1) ## **Related issues** ## **Manual testing steps** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.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-extension/blob/develop/.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.
Builds ready [bc47345]
Page Load Metrics (2202 ± 222 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
bfbd8a3
to
1d29e47
Compare
893d11b
to
7598b3a
Compare
Builds ready [cc5a9e2]
Page Load Metrics (2253 ± 185 ms)
Bundle size diffs [🚀 Bundle size reduced!]
|
Description
Adds an expanded view for snaps notifications, using JSX content returned from the snap to populate the expanded view.
Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions:
Screenshots/Recordings
After
Screen.Recording.2024-10-14.at.7.24.59.AM.mov
Pre-merge author checklist
Pre-merge reviewer checklist