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: add export button to owner list #2976

Merged
merged 2 commits into from
Dec 7, 2023
Merged

feat: add export button to owner list #2976

merged 2 commits into from
Dec 7, 2023

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Dec 7, 2023

What it solves

Resolves inability to export owner list

How this PR fixes it

This adds an export button below the owner list that, when clicked, creates as CSV file listing the current owners of the Safe Account and their name prioritised by address book then "known address".

How to test it

Open the owner list and click the new export button. Observe that the downloaded CSV lists all the owners.

Screenshots

image

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

@iamacook iamacook requested a review from katspaugh December 7, 2023 06:17
@iamacook iamacook self-assigned this Dec 7, 2023
Copy link

github-actions bot commented Dec 7, 2023

Branch preview

✅ Deploy successful!

https://export_owners--walletweb.review-wallet-web.5afe.dev

Copy link

github-actions bot commented Dec 7, 2023

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 Dec 7, 2023

📦 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.52 MB (🟡 +129.96 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!

Twenty-six Pages Changed Size

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

Page Size (compressed) First Load
/addOwner 3.5 KB (🟢 -94 B) 1.53 MB
/address-book 26.05 KB (🟡 +493 B) 1.55 MB
/apps 34.59 KB (🟢 -5 B) 1.56 MB
/apps/custom 27.12 KB (🟢 -5 B) 1.55 MB
/apps/open 26.65 KB (🟢 -113 B) 1.55 MB
/balances/nfts 18.59 KB (🟢 -88 B) 1.54 MB
/home 60.52 KB (🔴 +36.9 KB) 1.58 MB
/new-safe/create 11.83 KB (-1 B) 1.53 MB
/new-safe/load 7.3 KB (🟡 +12 B) 1.53 MB
/settings/appearance 8.02 KB (🟢 -516 B) 1.53 MB
/settings/cookies 7.59 KB (🟢 -177 B) 1.53 MB
/settings/data 7.49 KB (🟢 -176 B) 1.53 MB
/settings/environment-variables 8.8 KB (🟢 -165 B) 1.53 MB
/settings/modules 12.56 KB (🔴 +2.66 KB) 1.54 MB
/settings/notifications 11.15 KB (🟢 -120 B) 1.53 MB
/settings/safe-apps 12.11 KB (🟢 -162 B) 1.53 MB
/settings/security-login 46.25 KB (🔴 +31.88 KB) 1.57 MB
/settings/setup 35.88 KB (🔴 +11.58 KB) 1.56 MB
/share/safe-app 9.27 KB (🟢 -174 B) 1.53 MB
/transactions 52.36 KB (🟢 -112 B) 1.57 MB
/transactions/history 52.33 KB (🟢 -112 B) 1.57 MB
/transactions/messages 18.46 KB (🟢 -131 B) 1.54 MB
/transactions/queue 26.46 KB (🔴 +7.32 KB) 1.55 MB
/transactions/tx 6.13 KB (🟢 -135 B) 1.53 MB
/welcome 7.14 KB (🟡 +6 B) 1.53 MB
/welcome/social-login 7.57 KB (🟡 +4 B) 1.53 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 Dec 7, 2023

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
76.78% (+0.01% 🔼)
10945/14255
🔴 Branches
52.09% (+0.02% 🔼)
2268/4354
🟡 Functions 60.48% 1671/2763
🟡 Lines
78.15% (+0.01% 🔼)
9902/12671

Test suite run success

1283 tests passing in 177 suites.

Report generated by 🧪jest coverage report action from 3320008

@katspaugh
Copy link
Member

Nice!

Design-wise, I would make it a button next to the Add owner button, possibliy with the same download icon.

Screenshot 2023-12-07 at 08 21 40

Also, if an owner has a name, we might want to export that in the second column.

@iamacook
Copy link
Member Author

iamacook commented Dec 7, 2023

Nice!

Design-wise, I would make it a button next to the Add owner button, possibliy with the same download icon.
Screenshot 2023-12-07 at 08 21 40

Also, if an owner has a name, we might want to export that in the second column.

I've adjusted it in 3320008 accordingly. I think it looked much better without the icon so it's as suggested.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

👍

@francovenica
Copy link
Contributor

Looks good, but I'm not fully sold in the name of the file having the full address of the safe:
11155111-0x8f4A19C85b39032A37f7a6dCc65234f966F72551-owners
Maybe the "short version": Like "0x8f4A_2551"?

Opinions? @katspaugh @iamacook

Note: if this was already discussed and decided that way then it's fine and we can pass the ticket

@iamacook
Copy link
Member Author

iamacook commented Dec 7, 2023

Looks good, but I'm not fully sold in the name of the file having the full address of the safe: 11155111-0x8f4A19C85b39032A37f7a6dCc65234f966F72551-owners Maybe the "short version": Like "0x8f4A_2551"?

Opinions? @katspaugh @iamacook

Note: if this was already discussed and decided that way then it's fine and we can pass the ticket

The file name has not been discussed. I don't think it's a good idea to not have the full address though. There is the possibility that shortened addresses are the same.

@francovenica
Copy link
Contributor

Ok, is fine that way.

LGTM

@iamacook iamacook merged commit 28fcf00 into dev Dec 7, 2023
15 checks passed
@iamacook iamacook deleted the export-owners branch December 7, 2023 14:29
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants