Skip to content

Conversation

@davidmurdoch
Copy link
Contributor

@davidmurdoch davidmurdoch commented Jan 12, 2024

Updates Sass

Updates sass to the latest version, while also switching to sass-embedded (maintained by the same team, is faster than sass, and we don't need to patch it anymore!).

Moves fonts

This PR also moves the fonts directory to be relative to the CSS file that imports it. This helps with two things:

  1. its just nice to use real relative paths to files that are using them while developing (not just in the final build)
  2. the webpack build will work differently: it requires all the imports to use relative paths (there is a hack I can put in place to not require relative paths, but meh. I don't want to do that :-) ).

Use @use for the design-system instead of @import

The biggest change in this PR is moving towards the use of @use and away from @import, which is slated to be completely removed from Sass in some distance future release.

Bonus savings!

This PR also fixes a the duplication of CSS, as the design-system previously included actual CSS (colors, fonts, and font-awesome styles) and reduces the output size from ~1700KB to ~1300KB. The issue with that some devs were already @useing the design-system, which was re-including its all of its rules (mentioned above).

⚠️ Changes How We Write SCSS

So, from now on, if someone wants to use something from the design-system they'll need to put @use design-system"; at the top of the SCSS file.

@davidmurdoch davidmurdoch added DO-NOT-MERGE Pull requests that should not be merged team-extension-client labels Jan 12, 2024
@github-actions
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.

@codecov
Copy link

codecov bot commented Jan 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d3f0a32) 68.46% compared to head (b3e98b2) 68.46%.
Report is 27 commits behind head on develop.

❗ Current head b3e98b2 differs from pull request most recent head 3792d32. Consider uploading reports for the commit 3792d32 to get more accurate results

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #22531   +/-   ##
========================================
  Coverage    68.46%   68.46%           
========================================
  Files         1089     1089           
  Lines        43045    43045           
  Branches     11469    11469           
========================================
  Hits         29469    29469           
  Misses       13576    13576           

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

@metamaskbot
Copy link
Collaborator

Builds ready [504a580]
Page Load Metrics (536 ± 283 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint662401156029
domContentLoaded9183516330
load481578536590283
domInteractive9183516330
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@socket-security
Copy link

socket-security bot commented Jan 13, 2024

@socket-security
Copy link

socket-security bot commented Jan 13, 2024

👍 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.

Ignoring: npm/sass-embedded@1.71.1

View full report↗︎

Next steps

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

@gauthierpetetin gauthierpetetin added team-extension-platform Extension Platform team and removed team-extension-client labels Feb 9, 2024
@davidmurdoch davidmurdoch force-pushed the prepare-sass-update branch 4 times, most recently from 0d6fb1a to 4c0757e Compare February 15, 2024 17:13
@davidmurdoch davidmurdoch removed the DO-NOT-MERGE Pull requests that should not be merged label Feb 15, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [7fed5b1]
Page Load Metrics (429 ± 196 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint852011503617
domContentLoaded10100392813
load521127429409196
domInteractive10100392813
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.33 KiB (0.07%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@davidmurdoch davidmurdoch force-pushed the prepare-sass-update branch 3 times, most recently from 5231e2a to b3492e9 Compare February 16, 2024 20:41
@davidmurdoch davidmurdoch changed the title chore: prepare sass update chore: update sass to v1.71.0 Feb 16, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [e70ef4b]
Page Load Metrics (441 ± 204 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint971881602813
domContentLoaded992452813
load521089441424204
domInteractive992452813
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.33 KiB (0.07%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@davidmurdoch davidmurdoch marked this pull request as ready for review February 16, 2024 22:02
@metamaskbot
Copy link
Collaborator

Builds ready [2d9797e]
Page Load Metrics (1036 ± 406 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint842361434421
domContentLoaded1777412110
load5619581036845406
domInteractive1777412110
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 2.33 KiB (0.06%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@davidmurdoch
Copy link
Contributor Author

@SocketSecurity ignore npm/sass-embedded@1.71.1

@legobeat legobeat requested a review from naugtur February 23, 2024 04:34
@davidmurdoch davidmurdoch removed the DO-NOT-MERGE Pull requests that should not be merged label Feb 23, 2024
@davidmurdoch davidmurdoch merged commit 5fd2b7f into develop Feb 23, 2024
@davidmurdoch davidmurdoch deleted the prepare-sass-update branch February 23, 2024 16:23
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2024
@metamaskbot metamaskbot added the release-11.13.0 Issue or pull request that will be included in release 11.13.0 label Feb 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dependencies Pull requests that update a dependency file release-11.13.0 Issue or pull request that will be included in release 11.13.0 team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants