Page MenuHomePhabricator

[Performance] Use an img for loading the wordmark
Closed, ResolvedPublic

Description

We want to use an SVG for the Wikipedia logo to keep it crisp on every device like the mobile website currently does. Marvin's current implementation embeds the SVGs directly into the HTML:

import wordmarkEn from "./wordmark-en.svg";

...

    <div
      className="Wordmark"
      dangerouslySetInnerHTML={{ __html: wordmarkEn }}
    />

This, in combination with svg-inline-loader, causes the contents of the SVG to be included in the client public/index.js bundle which significantly increases its size and the server-side rendered page which negatively affects time to render. This tasks encompasses the work to use the SVG as an image that is downloaded outside of the critical path and update the Webpack configuration to copy the asset to a public build product.

References:

Event Timeline

Niedzielski renamed this task from [Performance] Use an img for loading the Wikipedia logo to [Performance] Use an img for loading the wordmark.Nov 15 2017, 7:15 PM

Change 391467 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Chore: use Webpack for server production builds

https://gerrit.wikimedia.org/r/391467

Change 391467 merged by jenkins-bot:
[marvin@master] Chore: use Webpack for server production builds

https://gerrit.wikimedia.org/r/391467

Change 391896 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Chore: move assets to common

https://gerrit.wikimedia.org/r/391896

Change 391897 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Chore: move config code to common

https://gerrit.wikimedia.org/r/391897

Change 391898 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Chore: consolidate manifest logic

https://gerrit.wikimedia.org/r/391898

Change 391899 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[marvin@master] Chore: load wordmark as a separate request

https://gerrit.wikimedia.org/r/391899

Change 391896 merged by jenkins-bot:
[marvin@master] Chore: move assets to common

https://gerrit.wikimedia.org/r/391896

Change 391897 merged by jenkins-bot:
[marvin@master] Chore: move config code to common

https://gerrit.wikimedia.org/r/391897

Change 391898 merged by jenkins-bot:
[marvin@master] Chore: consolidate manifest logic

https://gerrit.wikimedia.org/r/391898

Did some amends on the last patch, have a look @Niedzielski and merge if you want

Change 391899 merged by jenkins-bot:
[marvin@master] Chore: load wordmark as a separate request

https://gerrit.wikimedia.org/r/391899