nekochans / lgtm-cat-frontend

lgtm-cat(サービス名 LGTMeow https://lgtmeow.com) のフロントエンド用
https://lgtmeow.com
21 stars 2 forks source link

ServerComponentに出来るComponentはServerComponentに変更 #306

Closed keitakn closed 5 months ago

keitakn commented 5 months ago

issueURL

https://github.com/nekochans/lgtm-cat-frontend/issues/305

関連 URL

https://lgtm-cat-frontend-git-feature-issue305change-s-6b82a7-nekochans.vercel.app/

このPRで対応すること / このPRで対応しないこと

https://github.com/nekochans/lgtm-cat-frontend/issues/305 の完了の定義を満たす為にServerComponentに出来るComponentはServerComponentに変更する。

Storybook の URL もしくはスクリーンショット

https://622b6c5dc31e9e003a111eb5-ckimsfzrrl.chromatic.com/

変更点概要

タイトルの通り First Load JS のサイズを少しでも減らす為にServerComponentに出来るComponentはServerComponentに変更。

◯◯Template'use client'; が宣言されているので children としてServerComponentを渡す形になっている。

大きな変化はなかったが少しだけFirst Load JSを減らす事が出来た。

対応前

Route (app)                              Size     First Load JS
┌ ○ /                                    280 B           220 kB
├ ○ /_not-found                          0 B                0 B
├ ○ /apple-icon.png                      0 B                0 B
├ ○ /en                                  279 B           220 kB
├ ○ /en/maintenance                      278 B           220 kB
├ ○ /en/privacy                          279 B           220 kB
├ ○ /en/terms                            280 B           220 kB
├ ○ /en/upload                           279 B           220 kB
├ ○ /icon.png                            0 B                0 B
├ ○ /maintenance                         278 B           220 kB
├ ○ /manifest.webmanifest                0 B                0 B
├ ○ /opengraph-image.png                 0 B                0 B
├ ○ /privacy                             280 B           220 kB
├ ○ /robots.txt                          0 B                0 B
├ ○ /sitemap.xml                         0 B                0 B
├ ○ /terms                               278 B           220 kB
├ ○ /twitter-image.png                   0 B                0 B
└ ○ /upload                              280 B           220 kB
+ First Load JS shared by all            142 kB
  ├ chunks/884-115af2002957bd32.js       86.2 kB
  ├ chunks/fd9d1056-1f0e041c19dc7699.js  53.4 kB
  └ other shared chunks (total)          2.48 kB

ƒ Middleware                             156 kB

○  (Static)  prerendered as static content

対応後(First Load JSが少し減っている)

Route (app)                              Size     First Load JS
┌ ○ /                                    330 B           186 kB
├ ○ /_not-found                          0 B                0 B
├ ○ /apple-icon.png                      0 B                0 B
├ ○ /en                                  329 B           186 kB
├ ○ /en/maintenance                      331 B           186 kB
├ ○ /en/privacy                          330 B           186 kB
├ ○ /en/terms                            329 B           186 kB
├ ○ /en/upload                           330 B           186 kB
├ ○ /icon.png                            0 B                0 B
├ ○ /maintenance                         329 B           186 kB
├ ○ /manifest.webmanifest                0 B                0 B
├ ○ /opengraph-image.png                 0 B                0 B
├ ○ /privacy                             330 B           186 kB
├ ○ /robots.txt                          0 B                0 B
├ ○ /sitemap.xml                         0 B                0 B
├ ○ /terms                               329 B           186 kB
├ ○ /twitter-image.png                   0 B                0 B
└ ○ /upload                              329 B           186 kB
+ First Load JS shared by all            142 kB
  ├ chunks/884-115af2002957bd32.js       86.2 kB
  ├ chunks/fd9d1056-1f0e041c19dc7699.js  53.4 kB
  └ other shared chunks (total)          2.46 kB

ƒ Middleware                             156 kB

○  (Static)  prerendered as static content

レビュアーに重点的にチェックして欲しい点

特になし

補足情報

特になし

vercel[bot] commented 5 months ago

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

Name Status Preview Comments Updated (UTC)
lgtm-cat-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2024 8:26am
codecov[bot] commented 5 months ago

Codecov Report

Attention: Patch coverage is 0% with 734 lines in your changes are missing coverage. Please review.

Project coverage is 22.39%. Comparing base (ad26bbe) to head (af1118f).

Files Patch % Lines
...ontentsWrapper/MarkdownContentsWrapper.stories.tsx 0.00% 231 Missing and 1 partial :warning:
...PrivacyTemplate/TermsOrPrivacyTemplate.stories.tsx 0.00% 93 Missing and 1 partial :warning:
.../templates/ErrorTemplate/ErrorTemplate.stories.tsx 0.00% 70 Missing and 1 partial :warning:
...arkdownContentsWrapper/MarkdownContentsWrapper.tsx 0.00% 50 Missing and 1 partial :warning:
src/templates/TopTemplate/TopTemplate.stories.tsx 0.00% 44 Missing and 1 partial :warning:
...emplates/UploadTemplate/UploadTemplate.stories.tsx 0.00% 26 Missing and 1 partial :warning:
...outs/ResponsiveLayout/ResponsiveLayout.stories.tsx 0.00% 24 Missing and 1 partial :warning:
src/app/en/privacy/page.tsx 0.00% 18 Missing :warning:
src/app/en/terms/page.tsx 0.00% 18 Missing :warning:
src/app/terms/page.tsx 0.00% 18 Missing :warning:
... and 18 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #306 +/- ## ========================================== - Coverage 23.84% 22.39% -1.46% ========================================== Files 225 229 +4 Lines 8390 8936 +546 Branches 300 304 +4 ========================================== Hits 2001 2001 - Misses 6219 6761 +542 - Partials 170 174 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.