Page MenuHomePhabricator

[web] Introduce `MutedNotifsIllustration` component to replace S3-hosted asset
ClosedPublic

Authored by atul on Aug 9 2022, 12:24 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 4:20 AM
Unknown Object (File)
Tue, Nov 26, 12:51 AM
Unknown Object (File)
Mon, Nov 11, 1:51 AM
Unknown Object (File)
Mon, Nov 4, 7:02 PM
Unknown Object (File)
Oct 28 2024, 5:08 AM
Unknown Object (File)
Oct 28 2024, 5:08 AM
Unknown Object (File)
Oct 28 2024, 5:05 AM
Unknown Object (File)
Oct 20 2024, 1:28 AM
Subscribers

Details

Summary

Context: https://linear.app/comm/issue/ENG-1584/[web]-replace-s3-svg-urls-with-svgr-generated-react-components

We previously were fetching muted-notifs.svg from S3. It took a second for the SVG to download, which led to the page reflowing. We got around the reflowing issue by explicitly stating the height/width of every SVG asset so there was some "placeholder space" left for the asset to fill once it loaded. This led to an expensive process when adding SVG assets to web.

Instead, we can convert the SVG into a React component using SVGR (https://react-svgr.com/playground/) and include it in the repo. This also lets us avoid fetching the asset once the app has loaded.


Depends on D4787

Test Plan

Things continue to look as expected.

Before (prod):

Screen Shot 2022-08-09 at 3.27.01 PM.png (1×868 px, 97 KB)

After (after this stack):

Screen Shot 2022-08-09 at 3.27.18 PM.png (1×868 px, 99 KB)

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage