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: [Counterfactual] Update UI elements #3234

Merged
merged 27 commits into from
Feb 16, 2024
Merged

feat: [Counterfactual] Update UI elements #3234

merged 27 commits into from
Feb 16, 2024

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Feb 9, 2024

What it solves

Resolves #3207

How this PR fixes it

  • Updates the overview widget design
  • Adds a "First steps" widget that is only visible for undeployed safes
  • Hide every other widget for undeployed safes
  • Hide the overview buttons for undeployed safes
  • Shows an info message on the assets page with the option to activate the safe immediately
  • Displays a new First transaction dialog
  • Shows an indicator in the sidebar about the safe account status

How to test it

  1. Only the First steps widget should be visible
  2. There should be no buttons visible in the overview widget
  3. There should be an info message on the assets page with an "Activate now" button
  4. Pressing "Create transaction" should display the new dialog with multiple options
  5. There should be a warning indicator in the sidebar as long as the safe is not deploying
  6. Once a deployment is underway the indicator should turn blue and spin

Screenshots

Screenshot 2024-02-15 at 15 15 15 Screenshot 2024-02-14 at 16 44 21 Screenshot 2024-02-14 at 16 42 26 Screenshot 2024-02-14 at 16 55 53

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) 🧑‍💻

* fix: Implement the dashboard overview widget design

* test: Update dashboard smoke e2e test
* feat: Add first steps widget to dashboard

* fix: Display the widget in the dashboard

* fix: Extract last step as completed step, use enum and memoize items

* fix: Revert change to completedName

* fix: Remove StatusProgress and add individual first step cards

* fix: Add counterfactual check to widget

* fix: Remove steps badges
…rypto (#3220)

* fix: Show dialog with on-ramp options when pressing buy crypto

* refactor: Fix typo in BuyCryptoButton component

* fix: Separate logo from text and add a title
Copy link

github-actions bot commented Feb 9, 2024

Copy link

github-actions bot commented Feb 9, 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 Feb 9, 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 1.03 MB (🟡 +3.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!

Twelve 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/open 63.84 KB (🟢 -351 B) 1.09 MB
/balances 28.73 KB (🟡 +621 B) 1.06 MB
/balances/nfts 20.49 KB (-1 B) 1.05 MB
/home 52.77 KB (🔴 +11.4 KB) 1.08 MB
/new-safe/create 31.59 KB (🟢 -321 B) 1.06 MB
/settings/security-login 29.46 KB (🟢 -164 B) 1.06 MB
/settings/setup 31.19 KB (🟢 -41.22 KB) 1.06 MB
/transactions 92.32 KB (🟢 -354 B) 1.12 MB
/transactions/history 92.29 KB (🟢 -356 B) 1.12 MB
/transactions/messages 49.12 KB (🟢 -355 B) 1.08 MB
/transactions/queue 44.21 KB (🟢 -358 B) 1.07 MB
/transactions/tx 33.76 KB (🟢 -355 B) 1.06 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 Feb 9, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
78.66% (-0.04% 🔻)
11595/14740
🔴 Branches
56.71% (-0.06% 🔻)
2593/4572
🟡 Functions
63.41% (-0.23% 🔻)
1842/2905
🟢 Lines
80.04% (-0% 🔻)
10459/13068
Show new covered files 🐣
St.
File Statements Branches Functions Lines
🔴
... / ActivateAccountButton.tsx
50% 0% 0% 56.25%
🔴
... / index.tsx
55.56% 0% 0% 58.82%
🟡
... / index.tsx
62.16% 0% 0% 69.7%
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / transaction-guards.ts
77.52% (-1.05% 🔻)
41.94% (-2.89% 🔻)
73.81% (-1.8% 🔻)
78.16% (-0.66% 🔻)
🟢
... / txHistorySlice.ts
84.62% (-10.62% 🔻)
60% (-40% 🔻)
50% (-50% 🔻)
90.91% (-9.09% 🔻)
🔴
... / utils.ts
37.82% (+1.45% 🔼)
28.95% (+2.12% 🔼)
20% (-1.43% 🔻)
38.83% (+2.72% 🔼)

Test suite run success

1402 tests passing in 191 suites.

Report generated by 🧪jest coverage report action from aae01f7

Copy link

github-actions bot commented Feb 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 Feb 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

# Conflicts:
#	src/components/common/BuyCryproButton/index.tsx
#	src/components/dashboard/Overview/Overview.tsx
#	src/features/counterfactual/ActivateAccount.tsx
Copy link

github-actions bot commented Feb 15, 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

@francovenica
Copy link
Contributor

I wasn't able to reproduce the issue Andrei had with the popup of confirmation after the safe is deployed.

I'll keep the ticket up since some give was still being given in a slack thread, but at least from my side the dashboard looks fine

@liliya-soroka
Copy link
Member

From the UI the PR looks good.
After passing checks, the PR can be merged
@usame-algan

@usame-algan usame-algan changed the title feat: [Counterfactual] Update dashboard widgets feat: [Counterfactual] Update UI elements Feb 16, 2024
Comment on lines +208 to +218
for (let attempt = 0; attempt < maxAttempts; attempt++) {
const txResponse = await provider.getTransaction(txHash)
if (txResponse !== null) {
return txResponse
}
if (attempt < maxAttempts - 1) {
await delay(delayMs)
}
}
throw new Error('Transaction not found')
}
Copy link
Member

Choose a reason for hiding this comment

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

We have the exponential-backoff package for that. Possible to use that?

Copy link
Member Author

Choose a reason for hiding this comment

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

I have a local stash to replace that package with our own implementation so I would leave it as is for now since we will remove that dependency anyway.

@usame-algan usame-algan merged commit 0c9a326 into dev Feb 16, 2024
13 checks passed
@usame-algan usame-algan deleted the cf-dashboard branch February 16, 2024 14:14
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 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.

[Counterfactual] Implement Dashboard design
4 participants