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: Targeted survey banner popup [SW-269] #4338

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented Oct 8, 2024

What it solves

Resolves: https://www.notion.so/safe-global/Targeted-messaging-popup-banner-1198180fe57380e2a03cd7e4a1317f1e

How this PR fixes it

How to test it

Screenshots

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 Oct 8, 2024

Copy link

github-actions bot commented Oct 8, 2024

📦 Next.js Bundle Analysis for safe-wallet-web

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 962.85 KB (🟡 +1.62 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!

Three Pages Changed Size

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

Page Size (compressed) First Load
/new-safe/advanced-create 33.53 KB (🟢 -1.6 KB) 996.37 KB
/new-safe/create 32.79 KB (🟢 -1.6 KB) 995.64 KB
/new-safe/load 14.68 KB (🟢 -1.72 KB) 977.53 KB
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

github-actions bot commented Oct 8, 2024

Coverage report

Caution

Test run failed

St.
Category Percentage Covered / Total
🟡 Statements
78.09% (-0.01% 🔻)
12031/15406
🔴 Branches
58.27% (+0.07% 🔼)
3097/5315
🟡 Functions
65.05% (-0.04% 🔻)
1891/2907
🟡 Lines
79.66% (+0.02% 🔼)
10858/13630
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🟢
... / useShowOutreachPopup.tsx
100% 100% 100% 100%
🟢
... / constants.ts
70% 100% 100% 100%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / popupSlice.ts
40% (-13.85% 🔻)
100%
14.29% (-10.71% 🔻)
63.64% (-11.36% 🔻)
🟢
... / useTxPendingStatuses.ts
83.64% (-0.91% 🔻)
68.33% (-1.67% 🔻)
75%
92.63% (-1.05% 🔻)
🟢
... / index.tsx
90.91% (-0.27% 🔻)
77.42% (-2.58% 🔻)
100% 100%

Test suite run failed

Failed tests: 1/1492. Failed suites: 1/204.
  ● useShowOutreachPopup › should return false if the safe is not on the targeted list

    expect(received).toEqual(expected) // deep equality

    Expected: false
    Received: true

      14 |
      15 |     const { result } = renderHook(() => useShowOutreachPopup({}))
    > 16 |     expect(result.current).toEqual(false)
         |                            ^
      17 |   })
      18 |
      19 |   it('should return false if the connected wallet is not a signer of a targeted safe', async () => {

      at Object.toEqual (src/features/targetedOutreach/hooks/__tests__/useShowOutreachPopup.test.ts:16:28)

Report generated by 🧪jest coverage report action from 2cb21d8

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.

1 participant