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

Fix(Outreach): use versioning for outreach popup local storage flags [SW-690] #4700

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented Dec 20, 2024

What it solves

Resolves: https://www.notion.so/safe-global/76f265123c0a4ad680947ce489804342?v=f9f164524ec4464286fdc38f31589d0c&p=1628180fe573802f8b60f57c436d89da&pm=s

How this PR fixes it

  • adds versions to the localStorage and session storage flags used by the outreach popup

How to test it

  • Open a safe in a browser where the outreach popup was dismissed during the previous campaign. You can simulate this by creating a variable in localStorage called SAFE_v2__outreachPopup and setting it to true.
  • Open any safe as a signer. The new campaign outreach popup should still be shown.

Checklist

  • I've tested the branch on mobile 📱
  • I've documented how it affects the analytics (if at all) 📊
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

Copy link

github-actions bot commented Dec 20, 2024

@jmealy jmealy requested a review from katspaugh December 20, 2024 15:31
Copy link

📦 Next.js Bundle Analysis for @safe-global/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 1 MB (🟡 +12.25 KB)
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!

Thirty-eight Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/ 509 B (🟢 -1 B) 1 MB
/404 704 B (🟡 +1 B) 1 MB
/_offline 1.1 KB (🟡 +3 B) 1 MB
/addOwner 560 B (🟢 -4 B) 1 MB
/address-book 22.96 KB (🟢 -108 B) 1.02 MB
/apps 35.79 KB (🟡 +2.07 KB) 1.04 MB
/apps/bookmarked 474 B (🟢 -1 B) 1 MB
/apps/custom 33.87 KB (🟡 +2.08 KB) 1.03 MB
/apps/open 55.69 KB (🟡 +2.08 KB) 1.06 MB
/balances 29.61 KB (🟢 -102 B) 1.03 MB
/balances/nfts 9.54 KB (🟢 -3 B) 1.01 MB
/bridge 2.55 KB (🟢 -6 B) 1 MB
/cookie 8.8 KB (🟡 +32 B) 1.01 MB
/home 61.41 KB (🟡 +2.15 KB) 1.06 MB
/imprint 1.41 KB (🟢 -1 B) 1 MB
/licenses 2.46 KB (🟢 -4 B) 1 MB
/new-safe/advanced-create 26.47 KB (🟡 +18 B) 1.03 MB
/new-safe/create 25.61 KB (🟡 +19 B) 1.03 MB
/new-safe/load 6.09 KB (🟡 +1 B) 1.01 MB
/settings/appearance 2.25 KB (🟡 +2 B) 1 MB
/settings/environment-variables 3.27 KB (🟢 -1 B) 1 MB
/settings/modules 4.06 KB (🟡 +3 B) 1 MB
/settings/notifications 21 KB (🟢 -318 B) 1.02 MB
/settings/safe-apps 20.35 KB (🟡 +2.08 KB) 1.02 MB
/settings/security 2.34 KB (🟡 +2 B) 1 MB
/settings/setup 30.63 KB (🟢 -107 B) 1.03 MB
/share/safe-app 7.56 KB (🟢 -4 B) 1.01 MB
/swap 756 B (🟢 -4 B) 1 MB
/terms 12.93 KB (🟡 +1 B) 1.01 MB
/transactions 98.77 KB (🟡 +2.2 KB) 1.1 MB
/transactions/history 98.73 KB (🟡 +2.19 KB) 1.1 MB
/transactions/messages 60.38 KB (🟡 +2.08 KB) 1.06 MB
/transactions/msg 56.63 KB (🟡 +2.08 KB) 1.06 MB
/transactions/queue 49.48 KB (🟡 +2.08 KB) 1.05 MB
/transactions/tx 48.84 KB (🟡 +2.08 KB) 1.05 MB
/wc 701 B (🟢 -6 B) 1 MB
/welcome 6.92 KB (🟢 -6 B) 1.01 MB
/welcome/accounts 408 B (🟡 +1 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.

Copy link

Coverage report for apps/web

St.
Category Percentage Covered / Total
🟡 Statements
74.09% (-0.01% 🔻)
14565/19659
🔴 Branches
51.63% (-0.01% 🔻)
3468/6717
🔴 Functions 57.07% 2062/3613
🟡 Lines
75.63% (-0.01% 🔻)
13211/17468
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / useTxPendingStatuses.ts
77.5% (-0.83% 🔻)
64.06% (-1.56% 🔻)
68.18%
86.41% (-0.97% 🔻)

Test suite run success

1752 tests passing in 237 suites.

Report generated by 🧪jest coverage report action from 5cc8061

@katspaugh katspaugh changed the title Fix: use versioning for outreach popup local storage flags [SW-690] Fix(Outreach): use versioning for outreach popup local storage flags [SW-690] Dec 27, 2024
Copy link

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.

2 participants