Skip to content
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

Add support for localised Snap manifests #21909

Merged
merged 69 commits into from
Mar 15, 2024
Merged

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Nov 21, 2023

Description

This adds support for localised Snap manifests. Instead of getting the Snap name from the subject metadata controller, I've added a new selector which returns the localised manifest.

Related to MetaMask/snaps#1508.

Manual testing steps

  1. Install npm:@metamask/localization-example-snap from test-snaps.
  2. Make sure the proper name and description is shown everywhere.

Screenshots/Recordings

image

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@Mrtenz Mrtenz added the team-snaps DEPRECATED: Use "team-snaps-platform" or "team-snaps-ecosystem" instead label Nov 21, 2023
@Mrtenz Mrtenz requested review from a team as code owners November 21, 2023 11:50
@Mrtenz
Copy link
Member Author

Mrtenz commented Nov 21, 2023

@metamaskbot update-policies

@metamaskbot metamaskbot added the INVALID-PR-TEMPLATE PR's body doesn't match template label Nov 21, 2023
@metamaskbot
Copy link
Collaborator

Policies updated

ui/helpers/utils/util.js Outdated Show resolved Hide resolved
ui/pages/confirmation/confirmation.js Outdated Show resolved Hide resolved
ui/hooks/useTransactionInsights.js Outdated Show resolved Hide resolved
Copy link
Contributor

This PR has been automatically marked as stale because it has not had recent activity in the last 60 days. It will be closed in 14 days. Thank you for your contributions.

@github-actions github-actions bot added the stale issues and PRs marked as stale label Jan 21, 2024
Copy link
Contributor

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.

@github-actions github-actions bot removed the stale issues and PRs marked as stale label Jan 26, 2024
app/scripts/metamask-controller.js Outdated Show resolved Hide resolved
ui/helpers/utils/permission.js Outdated Show resolved Hide resolved
ui/selectors/selectors.js Show resolved Hide resolved
ui/selectors/selectors.js Outdated Show resolved Hide resolved
lavamoat/browserify/main/policy.json Outdated Show resolved Hide resolved
@hmalik88 hmalik88 removed the INVALID-PR-TEMPLATE PR's body doesn't match template label Mar 14, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [07b8470]
Page Load Metrics (876 ± 423 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702231203818
domContentLoaded167127157
load532096876882423
domInteractive167127147
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -394 Bytes (-0.01%)
  • ui: 1008 Bytes (0.01%)
  • common: -1.31 KiB (-0.03%)

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 49.29577% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 68.43%. Comparing base (21943ab) to head (3d69eb5).

Files Patch % Lines
app/scripts/metamask-controller.js 17.65% 14 Missing ⚠️
ui/helpers/utils/permission.js 18.75% 13 Missing ⚠️
ui/ducks/domains.js 0.00% 3 Missing ⚠️
app/scripts/lib/snap-keyring/snap-keyring.ts 0.00% 2 Missing ⚠️
...ission-list/permissions-connect-permission-list.js 0.00% 1 Missing ⚠️
ui/helpers/utils/util.js 66.67% 1 Missing ⚠️
ui/hooks/useTransactionInsights.js 66.67% 1 Missing ⚠️
ui/selectors/selectors.js 95.24% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #21909      +/-   ##
===========================================
+ Coverage    68.29%   68.43%   +0.14%     
===========================================
  Files         1142     1140       -2     
  Lines        43920    43750     -170     
  Branches     11777    11718      -59     
===========================================
- Hits         29995    29940      -55     
+ Misses       13925    13810     -115     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [3d69eb5]
Page Load Metrics (1430 ± 436 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702641274522
domContentLoaded1094332512
load5724771430907436
domInteractive1094332512
Bundle size diffs [🚀 Bundle size reduced!]
  • background: -394 Bytes (-0.01%)
  • ui: 807 Bytes (0.01%)
  • common: -1.07 KiB (-0.02%)

@hmalik88 hmalik88 merged commit b3b5ef6 into develop Mar 15, 2024
66 checks passed
@hmalik88 hmalik88 deleted the mrtenz/manifest-localisation branch March 15, 2024 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
@metamaskbot metamaskbot added the release-11.14.0 Issue or pull request that will be included in release 11.14.0 label Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.14.0 Issue or pull request that will be included in release 11.14.0 team-snaps-platform Snaps Platform team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants