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

feat(Logo): Refactor logo to improve bundle size and loading times #1210

Merged
merged 5 commits into from
Aug 26, 2024

Conversation

pladaria
Copy link
Member

@pladaria pladaria commented Aug 23, 2024

  • Logos are now lazy loaded. This should avoid sending unneeded skins and SVG data to apps
  • Make logo images RSC friendly

WEB-1986

modules of page-example-feedback

before

image

image

⚠️ The logo chunk is 62kB

after

image

No logo chunk in the bundle

Copy link

github-actions bot commented Aug 23, 2024

Size stats

master this branch diff
Total JS 12.1 MB 12.1 MB +6.04 kB
JS without icons 2.03 MB 2.03 MB +6.04 kB
Lib overhead 76.7 kB 76.7 kB 0 B
Lib overhead (gzip) 18.8 kB 18.8 kB 0 B

Copy link

github-actions bot commented Aug 23, 2024

Accessibility report
✔️ No issues found

ℹ️ You can run this locally by executing yarn audit-accessibility.

Copy link

github-actions bot commented Aug 23, 2024

Deploy preview for mistica-web ready!

✅ Preview
https://mistica-58or1414m-flows-projects-65bb050e.vercel.app

Built with commit aaecb03.
This pull request is being automatically deployed with vercel-action

Copy link

github-actions bot commented Aug 23, 2024

Screenshot tests report

✔️ All passing

@pladaria pladaria marked this pull request as ready for review August 23, 2024 13:36
@@ -15,6 +15,7 @@ const NavigationBarTest = (): JSX.Element => (
title,
to: `/${title}`,
}))}
logo={<span>LOGO</span>}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SSR tests fail with Lazy components.
Ticket to review this: https://jira.tid.es/browse/WEB-1998

@@ -0,0 +1,61 @@
import * as React from 'react';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each logo has its own file with a default export (this is required for lazy imports)

src/logo.tsx Show resolved Hide resolved
@pladaria pladaria added this pull request to the merge queue Aug 26, 2024
Merged via the queue into master with commit 15b77cb Aug 26, 2024
11 checks passed
@pladaria pladaria deleted the pladaria/WEB-1986_remove-skin-imports branch August 26, 2024 10:11
tuentisre pushed a commit that referenced this pull request Sep 3, 2024
# [15.19.0](v15.18.0...v15.19.0) (2024-09-03)

### Bug Fixes

* **Buttons:** avoid warnings related to change in order of react hooks ([#1229](#1229)) ([2dbc411](2dbc411))
* **i18n): Revert "feat(i18n:** improve texts sizes" because it is breaking ([#1226](#1226)) ([79eb4a4](79eb4a4))
* **Logo:** fix webpackChunkName magic comments ([#1214](#1214)) ([3d1f098](3d1f098))
* **Vivinho char:** vivinho char in headings being read as a separated heading ([#1209](#1209)) ([f0f5fb0](f0f5fb0))

### Features

* **Buttons:** refactor code and fix spacing bug in loading buttonLink ([#1212](#1212)) ([640e429](640e429))
* **i18n:** improve texts sizes ([#1204](#1204)) ([0345e7c](0345e7c))
* **Logo:** Refactor logo to improve bundle size and loading times ([#1210](#1210)) ([15b77cb](15b77cb))
* **NavigationBar, FunnelNavigationBar, MainNavigationBar:** add alternative variant ([#1200](#1200)) ([eef87ec](eef87ec))
@tuentisre
Copy link
Collaborator

🎉 This PR is included in version 15.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants