Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for external links in feature announcements (#26491)
<!-- 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 introduces support for external links in feature announcements. The following changes have been made: - **Import `TypeExternalLinkFields`**: Added the import statement for `TypeExternalLinkFields` in `feature-announcements.ts`. - **Update `TypeFeatureAnnouncementFields`**: Included the `externalLink` field in the `TypeFeatureAnnouncementFields` type. - **Modify `FeatureAnnouncementRawNotificationData`**: Added the `externalLink` field to the `FeatureAnnouncementRawNotificationData` type. - **Update `fetchFeatureAnnouncementNotifications`**: Modified the function to fetch and process the `externalLink` field from Contentful. - **Update UI Components**: Updated the relevant UI components to handle and display the `externalLink` in notifications. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/26491?quickstart=1) ## **Related issues** No related issues ## **Manual testing steps** To test the modification, it’s necessary to create a notification on Contentful that includes both types of links. ## **Screenshots/Recordings** [<!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. -->](https://www.figma.com/design/c7GgNw2kScGrVyRGAPhwEd/Notifications?node-id=3331-67563&t=RRE2jn0OHn8T2ui9-11) ### **Before** <img width="868" alt="Screenshot 2024-10-23 at 18 31 38" src="https://github.com/user-attachments/assets/d87dc0c4-c7c2-4046-8877-2b59bb67401e"> ### **After** <img width="868" alt="Screenshot 2024-10-23 at 18 33 52" src="https://github.com/user-attachments/assets/6e686e64-5b4e-46ed-8916-48183419f606"> ## **Pre-merge author checklist** - [x] 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). - [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-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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.
- Loading branch information