images: replace swaps-redesign.svg with swaps-redesign.jpg#20703
images: replace swaps-redesign.svg with swaps-redesign.jpg#20703legobeat wants to merge 7 commits intoMetaMask:developfrom
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. |
7d0d782 to
d6039d0
Compare
186c915 to
c2c4f05
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #20703 +/- ##
===========================================
+ Coverage 68.59% 68.70% +0.10%
===========================================
Files 1046 1042 -4
Lines 41613 41572 -41
Branches 11110 11097 -13
===========================================
+ Hits 28543 28558 +15
+ Misses 13070 13014 -56 ☔ View full report in Codecov by Sentry. |
9b03313 to
277ada3
Compare
277ada3 to
ff647d5
Compare
ee455bc to
8c5dd98
Compare
|
Can we instead make an actual SVG export of this image? |
I guess that would be even better and preferred. I'm not sure how to get at that, though.. @dan437 ? |
I thought it'd be fun to see what Chat GPT-4 can do with a request to convert a png to an svg. It, uh, struggles: 😆 |
ce590c3 to
df3b4ac
Compare
|
This should be better. Thanks to @eriknson! |
|
Removing that angled fox only from the latest svg brings it down to 32k (11k gzipped) if that's an option... I suspect the gradients in the background account for a significant part, in case those are easily extractable and can be replaced with a border for the sake of the What's-new display. |
052e0fb to
546a86a
Compare
app/images/swaps-redesign.svg
Outdated
There was a problem hiding this comment.
The dimensions and aspect ratio of the new image are different. Did you verify that this doesn't break anything in the extension?
I guess the whole notification goes with it? |
24ed17a to
d86ed2a
Compare
d86ed2a to
d963379
Compare
|
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. |
|
This PR was closed because there has been no follow up activity in the last 14 days. Thank you for your contributions. |
## **Description** Continues the work that @legobeat was doing in #20703 and #21533 All old numbered notifications except 8, 20, and 24 were permanently turned off, but their code, their `messages.json`, and most importantly their images were still present in the Extension. By removing all this, we reduce the size of the zipped Extension by 949kB, and the unzipped Extension by 1,852kB. **IMPORTANT**: This is **NOT** well-tested from a QA perspective, and QA should do some good testing on it before we merge. ## **Related issues** Followup to: #20703 Followup to: #21533 --------- Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
## **Description** Continues the work that @legobeat was doing in #20703 and #21533 All old numbered notifications except 8, 20, and 24 were permanently turned off, but their code, their `messages.json`, and most importantly their images were still present in the Extension. By removing all this, we reduce the size of the zipped Extension by 949kB, and the unzipped Extension by 1,852kB. **IMPORTANT**: This is **NOT** well-tested from a QA perspective, and QA should do some good testing on it before we merge. ## **Related issues** Followup to: #20703 Followup to: #21533 --------- Co-authored-by: legobt <6wbvkn0j@anonaddy.me>

Explanation
This image weighs in at 244kB (~1% of the entire
metamask-extensionbundle) - it's actually "not really" an svg but an embedded png. The base64 encoding adds extra overhead so just converting it to a.pngshould already save some space.This converts it to a jpg (95% quality) to a size reduction to 90kB.This converts it to a jpg (50% resize; 95% quality) to a filesize reduction to 33kB.This converts it to a jpg (50% resize; 98% quality) to a filesize reduction to 43kB.
Related: #19169
Used ImageMagick for conversion:
Screenshots/Screencaps
Before
https://github.com/MetaMask/metamask-extension/blob/3d2de0211df1308a27897cfc60f8460120e93f7a/app/images/swaps-redesign.svg
After
https://github.com/MetaMask/metamask-extension/blob/5c8763d51c14056765112e9bd19a0e19668d2061/app/images/swaps-redesign.jpg
Manual Testing Steps
Pre-merge author checklist
Pre-merge reviewer checklist
If further QA is required (e.g. new feature, complex testing steps, large refactor), add the
Extension QA Boardlabel.In this case, a QA Engineer approval will be be required.