-
Notifications
You must be signed in to change notification settings - Fork 465
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
Refactor: Box flex -> Stack #4629
Conversation
Branch preview✅ Deploy successful! Website: Storybook: |
Coverage report
Show files with reduced coverage 🔻
Test suite run success1666 tests passing in 227 suites. Report generated by 🧪jest coverage report action from 68e5643 |
📦 Next.js Bundle Analysis for safe-wallet-webThis analysis was generated by the Next.js Bundle Analysis action. 🤖
|
Page | Size (compressed) |
---|---|
global |
1 MB (🟡 +192 B) |
Details
The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!
Twenty-six Pages Changed Size
The following pages changed size from the code in this PR compared to its base branch:
Page | Size (compressed) | First Load |
---|---|---|
/_offline |
1.05 KB (🟢 -44 B) |
1 MB |
/address-book |
23.07 KB (-1 B) |
1.03 MB |
/apps |
33.23 KB (🟢 -29 B) |
1.04 MB |
/apps/custom |
31.29 KB (🟢 -23 B) |
1.03 MB |
/apps/open |
53.65 KB (-4 B) |
1.06 MB |
/balances |
29.83 KB (🟡 +15 B) |
1.03 MB |
/balances/nfts |
9.62 KB (🟢 -20 B) |
1.01 MB |
/bridge |
2.54 KB (🟢 -8 B) |
1.01 MB |
/home |
58.77 KB (🟡 +38 B) |
1.06 MB |
/new-safe/advanced-create |
26.45 KB (🟡 +2 B) |
1.03 MB |
/new-safe/create |
25.58 KB (🟡 +2 B) |
1.03 MB |
/new-safe/load |
6.06 KB (🟡 +5 B) |
1.01 MB |
/settings/data |
1.88 KB (🟡 +1 B) |
1 MB |
/settings/modules |
4.13 KB (🟡 +1 B) |
1.01 MB |
/settings/security |
2.39 KB (🟢 -22 B) |
1.01 MB |
/settings/setup |
30.76 KB (🟢 -34 B) |
1.03 MB |
/share/safe-app |
7.56 KB (🟢 -8 B) |
1.01 MB |
/stake |
607 B (🟢 -2 B) |
1 MB |
/transactions |
96.91 KB (🟡 +35 B) |
1.1 MB |
/transactions/history |
96.87 KB (🟡 +34 B) |
1.1 MB |
/transactions/messages |
58.42 KB (🟡 +34 B) |
1.06 MB |
/transactions/msg |
54.59 KB (🟡 +38 B) |
1.06 MB |
/transactions/queue |
47.55 KB (🟡 +36 B) |
1.05 MB |
/transactions/tx |
46.81 KB (🟡 +35 B) |
1.05 MB |
/welcome |
6.8 KB (🟡 +1 B) |
1.01 MB |
/welcome/accounts |
399 B (🟢 -2 B) |
1 MB |
Details
Only the gzipped size is provided here based on an expert tip.
First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link
is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.
Any third party scripts you have added directly to your app using the <script>
tag are not accounted for in this analysis
Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review by ChatGPT
@@ -206,7 +206,7 @@ exports[`SignOrExecute should display a loading component 1`] = ` | |||
class="MuiCardContent-root cardContent css-1lt5qva-MuiCardContent-root" | |||
> | |||
<div | |||
class="MuiBox-root css-17luq05" | |||
class="MuiStack-root css-17uq0s2-MuiStack-root" | |||
> | |||
<div | |||
class="box MuiBox-root css-0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the class name change doesn't affect layout or styling elsewhere. Check for CSS specificity issues or dependencies that could arise from changing MuiBox-root
to MuiStack-root
. Verify no unintended UI changes occur with this update.
@@ -146,7 +146,7 @@ exports[`BatchTransactions should render a list of batch transactions 1`] = ` | |||
class="MuiBox-root css-1lchl8k" | |||
> | |||
<div | |||
class="MuiBox-root css-171onha" | |||
class="MuiStack-root css-c4vnuj-MuiStack-root" | |||
title="GnosisSafeProxy" | |||
> | |||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switching from MuiBox-root
to MuiStack-root
may affect layout or styling. Ensure the new component behaves as expected in all supported browsers, especially regarding flexbox behavior, as Stack
relies heavily on it. Test thoroughly to avoid layout issues.
@@ -240,7 +240,7 @@ exports[`SettingsChange should display the SettingsChange component with owner d | |||
class="MuiBox-root css-1lchl8k" | |||
> | |||
<div | |||
class="MuiBox-root css-171onha" | |||
class="MuiStack-root css-c4vnuj-MuiStack-root" | |||
title="Nevinha" | |||
> | |||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No significant issues found in these specific changes. The alteration involves switching from MuiBox-root
to MuiStack-root
, which might reflect a layout or structural change. Verify if MuiStack
is appropriate and aligns with intended design changes.
@@ -937,7 +937,7 @@ exports[`ConfirmationView should display a confirmation with method call when th | |||
class="MuiBox-root css-1lchl8k" | |||
> | |||
<div | |||
class="MuiBox-root css-171onha" | |||
class="MuiStack-root css-c4vnuj-MuiStack-root" | |||
title="MetaMultiSigWallet" | |||
> | |||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure that the use of MuiStack-root
instead of MuiBox-root
is intentional and accounts for the layout and styling differences between these components. Check for potential impact on layout and visual consistency across different parts of the application.
@@ -185,7 +185,7 @@ const AssetsTable = ({ | |||
sticky: true, | |||
collapsed: item.tokenInfo.address === hidingAsset, | |||
content: ( | |||
<Box display="flex" flexDirection="row" gap={1} alignItems="center"> | |||
<Stack direction="row" spacing={1} alignItems="center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed a couple other places. Will close the PR, not worth the trouble.
Replace all instances of
<Box display="flex" ... >
with the more idiomatic and shorter<Stack ... >
.