Skip to content

Conversation

@damianstasik
Copy link
Contributor

@damianstasik damianstasik commented Mar 24, 2024

Description

The SVG pattern used for the glowing backdrop is quite big, fortunately thanks to compression instead of transferring 50kb only around 6kb is sent through the wire. There is still issue of the additional request just to show a pattern which blinks on page load no matter how fast your Internet connection might be. This PR is an experiment to simplify the SVG and inline it into a React component so that we do not make unnecessary requests.

To simplify the SVG I've tried to run it through SVGO, but there is a lot of separate/unmergable paths and a bit of unnecessary complexity so the outcome was not as good as it could be. I've decided to remake the it in Figma from scratch, make it pixel-perfect, controllable with local vars to make further adjustments much easier, then I flattened the paths and exported the result.

Old SVG – pre-optimized: 48.28kb, optimized: 11.38k (1.18kb gzipped)
New SVG – pre-optimized: 6.81k, optimized: 4.89k (673b gzipped)

I still have a few ideas how to bring that down even more, but I'll need a bit more time if there's an interest, if no feel free to close this PR.

Validation

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npx turbo format to ensure the code follows the style guide.
  • I have run npx turbo test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@vercel
Copy link

vercel bot commented Mar 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Apr 21, 2024 9:10am

@damianstasik damianstasik changed the title refactor: Inline and simplify glowing background SVG pattern refactor: Inline and simplify glowing backdrop SVG pattern Mar 24, 2024
@AugustinMauroy
Copy link
Member

Just something strange the design had change. it's can from you svg manipulation. Try to keep SVG as it

@AugustinMauroy
Copy link
Member

it's can solve #6520

@ovflowd
Copy link
Member

ovflowd commented Mar 25, 2024

it's can solve #6520

Probably yes, yea.

@AugustinMauroy
Copy link
Member

Note we have already an component HexagonGrid use on OG generation

@ovflowd
Copy link
Member

ovflowd commented Apr 15, 2024

Hey @damianstasik any updates to the PR?

@ovflowd
Copy link
Member

ovflowd commented Apr 21, 2024

@AugustinMauroy do you mind taking over this PR?

@AugustinMauroy AugustinMauroy added the github_actions:pull-request Trigger Pull Request Checks label Apr 21, 2024
@AugustinMauroy AugustinMauroy marked this pull request as ready for review April 21, 2024 09:09
@AugustinMauroy AugustinMauroy requested a review from a team as a code owner April 21, 2024 09:09
@github-actions github-actions bot removed the github_actions:pull-request Trigger Pull Request Checks label Apr 21, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Apr 21, 2024

Lighthouse Results

URL Performance Accessibility Best Practices SEO Report
/en 🟢 91 🟢 100 🟢 100 🟢 91 🔗
/en/about 🟢 98 🟢 100 🟢 100 🟢 91 🔗
/en/about/previous-releases 🟢 98 🟢 98 🟢 100 🟢 92 🔗
/en/download 🟢 99 🟢 100 🟢 100 🟢 91 🔗
/en/blog 🟢 100 🟢 100 🟢 100 🟢 92 🔗

@github-actions
Copy link
Contributor

Unit Test Coverage Report

Lines Statements Branches Functions
Coverage: 91%
90.04% (588/653) 76.08% (175/230) 92.18% (118/128)

Unit Test Report

Tests Skipped Failures Errors Time
128 0 💤 0 ❌ 0 🔥 5.591s ⏱️

@ovflowd ovflowd merged commit 662aabc into nodejs:main Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants