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: allow subscribing to owned but not added safes #3429

Merged
merged 13 commits into from
Mar 22, 2024
Merged

fix: allow subscribing to owned but not added safes #3429

merged 13 commits into from
Mar 22, 2024

Conversation

jmealy
Copy link
Contributor

@jmealy jmealy commented Mar 12, 2024

What it solves

Resolves #3288

How this PR fixes it

  • Do not show added but not owned safes in global notification settings.
  • Show owned safes plus added & owned safes.
  • Remove the notification banner completely.

How to test it

  1. Go to the settings->notifications -> global preferences
  2. You should see the option to add notifications to only safes that are owned by the connected wallet.

  1. Observe that the notification banner does not show up under any conditions.

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

github-actions bot commented Mar 12, 2024

Copy link

github-actions bot commented Mar 12, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: βœ… success
  • Annotations: 0 total

Report generated by eslint-plus-action

Copy link

github-actions bot commented Mar 12, 2024

πŸ“¦ Next.js Bundle Analysis for safe-wallet-web

This analysis was generated by the Next.js Bundle Analysis action. πŸ€–

πŸŽ‰ Global Bundle Size Decreased

Page Size (compressed)
global 994.07 KB (🟒 -22.26 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!

Fifteen Pages Changed Size

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

Page Size (compressed) First Load
/apps 50.94 KB (🟑 +4.15 KB) 1.02 MB
/apps/custom 42.56 KB (🟑 +4.15 KB) 1.01 MB
/apps/open 66.79 KB (🟑 +2.89 KB) 1.04 MB
/balances 29.91 KB (🟑 +7 B) 1023.98 KB
/balances/nfts 23.31 KB (🟑 +2.89 KB) 1017.38 KB
/home 57.14 KB (🟑 +4.24 KB) 1.03 MB
/new-safe/create 35.24 KB (🟑 +2.89 KB) 1.01 MB
/new-safe/load 21.38 KB (🟑 +2.89 KB) 1015.45 KB
/settings/notifications 28Β KB (πŸ”΄ +16.05Β KB) 1022.07Β KB
/settings/security-login 30.48 KB (🟑 +7 B) 1 MB
/transactions 91.97 KB (🟑 +2.89 KB) 1.06 MB
/transactions/history 91.94 KB (🟑 +2.88 KB) 1.06 MB
/transactions/messages 51.65 KB (🟑 +2.88 KB) 1.02 MB
/transactions/queue 47.25 KB (🟑 +2.88 KB) 1.02 MB
/transactions/tx 36.6 KB (🟑 +2.88 KB) 1.01 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

github-actions bot commented Mar 12, 2024

Coverage report

St.❔
Category Percentage Covered / Total
🟑 Statements
79.36% (-0.11% πŸ”»)
11049/13923
πŸ”΄ Branches
58.26% (-0.26% πŸ”»)
2598/4459
🟑 Functions
65.91% (-0.24% πŸ”»)
1779/2699
🟒 Lines
80.66% (-0.08% πŸ”»)
9951/12337
Show new covered files 🐣
St.❔
File Statements Branches Functions Lines
πŸ”΄
... / useAllOwnedSafes.ts
44.44% 0% 0% 57.14%
Show files with reduced coverage πŸ”»
St.❔
File Statements Branches Functions Lines
🟑
... / sdk.ts
69.05% (-7.14% πŸ”»)
35.29% (-9.15% πŸ”»)
72.73% (-2.27% πŸ”»)
68% (-9.03% πŸ”»)
🟑
... / wallets.ts
62.86% (-3.81% πŸ”»)
25%
75% (-2.78% πŸ”»)
65.52% (-3.23% πŸ”»)
πŸ”΄
... / useOnboard.ts
50.38% (-0.4% πŸ”»)
23.81% 15%
52.99% (-0.52% πŸ”»)
🟒
... / useChains.ts
100%
50% (-50% πŸ”»)
100% 100%
🟑
... / addedSafesSlice.ts
63.16% (-21.05% πŸ”»)
50%
41.67% (-41.67% πŸ”»)
67.74% (-16.13% πŸ”»)
🟒
... / WalletConnectWallet.ts
90.48% (-0.22% πŸ”»)
90.48% (-1.19% πŸ”»)
84%
92.5% (-0.18% πŸ”»)
🟒
... / index.tsx
100%
85% (-1.36% πŸ”»)
100% 100%
🟒
... / index.tsx
100%
86.36% (-1.14% πŸ”»)
100% 100%
🟒
... / index.tsx
100%
95% (-0.56% πŸ”»)
100% 100%
🟒
... / index.tsx
93.02% (+0.72% πŸ”Ό)
88.24% (-3.43% πŸ”»)
76.92% (+1.92% πŸ”Ό)
94.74% (+0.62% πŸ”Ό)
🟒
... / index.tsx
86.67% (-13.33% πŸ”»)
66.67% (-33.33% πŸ”»)
33.33% (-66.67% πŸ”»)
85.71% (-14.29% πŸ”»)
🟒
... / index.tsx
87.76% (-0.24% πŸ”»)
73.33% 100%
90.91% (-0.2% πŸ”»)
🟒
... / index.tsx
83.33% (-1.85% πŸ”»)
100%
33.33% (-26.67% πŸ”»)
82.61% (-2.01% πŸ”»)
🟑 src/pages/404.tsx 68.75%
64.29% (-7.14% πŸ”»)
50% 71.43%

Test suite run success

1401 tests passing in 194 suites.

Report generated by πŸ§ͺjest coverage report action from cdbaf19

Copy link

github-actions bot commented Mar 13, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: βœ… success
  • Annotations: 0 total

Report generated by eslint-plus-action

@jmealy jmealy marked this pull request as ready for review March 14, 2024 11:19
Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering that we have the notification feature for a while now, how complex the PushNotificationBanner component is and that we already received feedback in the past to reduce the number of popups I would be in favour of removing it completely. Lets discuss it with the team.

@usame-algan
Copy link
Member

@jmealy discussed it this morning and others are also in favour of removing the banner. @katspaugh suggests to rename the "Settings" button to "Push notification settings"
Screenshot 2024-03-18 at 10 08 17

@jmealy
Copy link
Contributor Author

jmealy commented Mar 20, 2024

@jmealy discussed it this morning and others are also in favour of removing the banner. @katspaugh suggests to rename the "Settings" button to "Push notification settings"

brilliant, thanks Usame πŸ™

Copy link

github-actions bot commented Mar 21, 2024

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: βœ… success
  • Annotations: 0 total

Report generated by eslint-plus-action

@jmealy jmealy requested a review from usame-algan March 21, 2024 11:05
@usame-algan
Copy link
Member

@mike10ca do we need to update something in Testrail now that the Push Notification Banner has been removed?

@mike10ca
Copy link
Contributor

@mike10ca do we need to update something in Testrail now that the Push Notification Banner has been removed?

@usame-algan no, since automation does not cover notifications to date.

@francovenica
Copy link
Contributor

Are we renaming this button as "Push notifications settings" or I missunderstood and it will remain as "settings"?
image

@francovenica
Copy link
Contributor

The rest looks good

Safe you added but don't own doesn't show up in the global settings
The notification popUp doesn't show up anymore (checked for CF safes after deployed as well)
Tested notifications in general (incomming, outgoing tx and tx that need signing)

If the button will remain as "Settings" then the ticket can be merged. If not, change the test and don't put it in QA, just merge it

@jmealy jmealy merged commit e973dfd into dev Mar 22, 2024
14 checks passed
@jmealy jmealy deleted the subscribe branch March 22, 2024 08:50
@github-actions github-actions bot locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't subscribe to notifications for owned un-added safe
4 participants