safe-wallet-web icon indicating copy to clipboard operation
safe-wallet-web copied to clipboard

feat: allow users to hide Safe Pass promotion

Open schmanu opened this issue 1 year ago β€’ 12 comments

How this PR fixes it

Adds "Don't show again" button to Safe Pass promotion.

How to test it

  • Go to the dashboard on a mainnet Safe
  • Hide the promotion

Screenshots

Screenshot 2024-07-22 at 15 19 46 Screenshot 2024-07-22 at 15 19 39

Checklist

  • [x] I've tested the branch on mobile πŸ“±
  • [x] I've documented how it affects the analytics (if at all) πŸ“Š
  • [x] I've written a unit/e2e test for it (if applicable) πŸ§‘β€πŸ’»

schmanu avatar Jul 22 '24 13:07 schmanu

Branch preview

βœ… Deploy successful!

Website: https://feat_hide_pass_promo--walletweb.review.5afe.dev/home?safe=eth:0xA77DE01e157f9f57C7c4A326eeE9C4874D0598b6

Storybook: https://feat_hide_pass_promo--walletweb.review.5afe.dev/storybook/

github-actions[bot] avatar Jul 22 '24 13:07 github-actions[bot]

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: :white_check_mark: success
  • Annotations: 0 total

Report generated by eslint-plus-action

github-actions[bot] avatar Jul 22 '24 13:07 github-actions[bot]

πŸ“¦ 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 950.48 KB (🟑 +37 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!

One Page Changed Size

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

Page Size (compressed) First Load
/home 58.46 KB (🟑 +71 B) 1008.94 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.

github-actions[bot] avatar Jul 22 '24 13:07 github-actions[bot]

Coverage report

St.:grey_question:
Category Percentage Covered / Total
🟑 Statements
78.48% (-0.02% πŸ”»)
11727/14943
πŸ”΄ Branches
58.82% (-0.02% πŸ”»)
2958/5029
🟑 Functions
65.96% (-0.04% πŸ”»)
1878/2847
🟑 Lines
79.85% (-0.02% πŸ”»)
10570/13237
Show files with reduced coverage πŸ”»
St.:grey_question:
File Statements Branches Functions Lines
πŸ”΄
... / sentry.ts
46.67% (-20% πŸ”»)
0% (-11.11% πŸ”»)
0% (-100% πŸ”»)
46.15% (-23.08% πŸ”»)

Test suite run success

1450 tests passing in 201 suites.

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

github-actions[bot] avatar Jul 22 '24 13:07 github-actions[bot]

@schmanu It seems the PR didn't actually deployed. The environment doesn't work, throws a 404. Maybe it has to do with what it was discussed here ?

francovenica avatar Jul 22 '24 16:07 francovenica

@francovenica I merged dev into this and it works again. Can you re-test?

schmanu avatar Jul 23 '24 06:07 schmanu

Thanks for re-building.

The button works fine, but it looks kinda out of place for the mobile viewport for being next to the "load more". image

I'd say that it should look like this, where if you reduce the view port even more the "load more" goes down a bit. but the button probably should be centered if this is the case: image

@TanyaEfremova Any suggestion?

francovenica avatar Jul 23 '24 20:07 francovenica

Fair comment! Is it possible to implement the following rules to the mobile button groups in widgets:

  • Display them 1 below another and stretch in full width
  • Learn more can belong to the stepper component and be shown below

See example

cc @schmanu

TanyaEfremova avatar Jul 30 '24 12:07 TanyaEfremova

@francovenica I adjusted it according to Tanyas comments. Can you re-check?

schmanu avatar Jul 31 '24 11:07 schmanu

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: :white_check_mark: success
  • Annotations: 0 total

Report generated by eslint-plus-action

github-actions[bot] avatar Jul 31 '24 11:07 github-actions[bot]

Looks nice!

image

francovenica avatar Jul 31 '24 23:07 francovenica

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: :white_check_mark: success
  • Annotations: 0 total

Report generated by eslint-plus-action

github-actions[bot] avatar Aug 07 '24 09:08 github-actions[bot]