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: Keep Sidebar drawer mounted #4595

Closed
wants to merge 50 commits into from
Closed

fix: Keep Sidebar drawer mounted #4595

wants to merge 50 commits into from

Conversation

usame-algan
Copy link
Member

What it solves

The Sidebar has a delay when opening with a lot of safes. This PR keeps the Sidebar Drawer mounted to resolve it. It does not refactor the hooks that are slow.

How this PR fixes it

  • Adds keepMounted: true to the Sidebar Drawer

How to test it

  1. Open a Safe with a wallet that owns a lot of safes
  2. Open and close the sidebar a few times
  3. Observe no delay when doing so

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

compojoom and others added 30 commits November 19, 2024 11:09
* chore: update to nextjs 15

* chore: fix tsc lint errors

* chore: fix eslint errors

* chore: fixing failing unit tests

* chore: remove yarn

* chore: update eslint to v9

* chore: update github eslint action

* chore: update cypress to v13.15.2 (#4490)

* chore: update cypress to v13.15.2

* chore: update cypress github action to use v13.15.2

* chore: update mui to v6 (#4499)

* chore: update mui to v6

Applied codemons to update the code

* refactor: fix DatePicker with mui v6

fix: failing Date test

* refactor: use ListItemButton instead of ListItem

the selected and disabled props on ListItem have been removed in v6, but
are available on the ListItemButton

* chore: update snapshots

* refactor: recoveryModal tests use snapshots

* fix: failing bookmarks test with mui v6

* fix: missing DM-Sans font

* fix: drawer was stealing clicks from rest of page

* fix: failing tests

* fix: fonts fail to load

Read the comment in the file and have fun!

* fix: prettier errors

* fix: tsc errors
* Fix: mui accordion background

* Update tests
* Fix: remove old app store button

* Rm import
* Chore: replace @WalletConnect packages with @reown/walletkit

* Fix tests

* Add core
* fix: fetch safe overviews including untrusted token fiatTotal

* test: fix safeOverviews.test.ts

* chore: add comment explaining why trusted needs to be false
Bumps [ethers](https://github.com/ethers-io/ethers.js) from 6.11.1 to 6.13.4.
- [Release notes](https://github.com/ethers-io/ethers.js/releases)
- [Changelog](https://github.com/ethers-io/ethers.js/blob/main/CHANGELOG.md)
- [Commits](ethers-io/ethers.js@v6.11.1...v6.13.4)

---
updated-dependencies:
- dependency-name: ethers
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Feat(Sidebar): Add pinned safes list to sidebar and accounts page [SW-304] (#4412)

* feat: allow pinning and unpinning accounts

* feat: allow pinning multichain safes

* fix: pinning of multichain safes

* feat: simplify all accounts list

* feat: load safe info when safelist item is scrolled into view

* feat: remove safes when unpinning if they werent added before being pinned

* fix: pinning behaviour of multichain safes

* fix: multichain sub itemstyles

* feat: add empty state for pinned list

* fix: lint errors

* fix: show threshold for counterfactual safes

* fix: mobile layout

* restore loading balances for safes

* fix: subaccount item layout, and app crashing on unpin

* feat: expand all accounts if there are no pinned safes

* fix: flickering when loading all safes

* fix: account for default threshold and owner numbers

* reduce transition animation duration for pinning and unpinning safes

* reduce space between chains and balance

* Feat(sidebar): sort safes by name and recently used [SW-307] (#4458)

* Feat: add option to sort by recently visited and by name

* tests: add new properties to unit tests

* fix: make order by preference persist

* feat: sort sub account items by name and recently visited

* refactor: fix incorrect variable names and remove console log

* Feat(sidebar): filter safes by search query [SW-305] (#4484)

* feat: filter safes by search query

* feat: display current order by option. fix text colors

* feat: search by adddress name and chain name

* fix: use ignoreLocation to match the final address characters when searching

* add tracking event for search

* fix: cypress tests

* Feat(sidebar): Add tracking events for search, sorting, and pinning/unpinning safes [SW-308] (#4500)

* track the number of pined safes on the accounts page

* feat: track pinning, unpinning, and sorting

* fix: separate watchlist and pined safes for tracking

* fix: remove wallet from dependency array

* Update src/components/welcome/MyAccounts/useTrackedSafesCount.ts

Co-authored-by: Usame Algan <[email protected]>

* fix: lint

---------

Co-authored-by: Usame Algan <[email protected]>

* Refactor(Sidebar): use feature directory structure for MyAccounts (#4508)

* refactor: move myAccounts to features

* fix:align  queue and status chips with address for large screens

* remove commented code

* fix: chip styles

* fix(sidebar):  fix designs for data widget and empty/disconnected state [SW-507] (#4509)

* fix: add connect wallet button and empty state

* fix: datawidget styles

* Fix(Sidebar): Include sub safe in search results [SW-305] (#4527)

* fix: CF chip dark mode color

* include multichain sub safe names in search

* fix: queue chips being cut off

* Fix: rm Remove option

* Refactor: pinned = added safes [SW-304] (#4552)

* Refactor: pinned = added safes

* Rm Watchlist word

* Fix duplicate cf safes

---------

Co-authored-by: Usame Algan <[email protected]>
Co-authored-by: katspaugh <[email protected]>
Co-authored-by: katspaugh <[email protected]>
* fix: Disable transaction buttons until sdk is initialized

* fix: Failing tests

* fix: Add test case and adjust other tests to use getByText

---------

Co-authored-by: katspaugh <[email protected]>
* Refactor: rm unnecessary tx decoding

* Update tests

* Repropose after sign relayed

* Update SDK type

* Update src/components/tx/confirmation-views/index.tsx

Co-authored-by: Usame Algan <[email protected]>

* Fix Order type

* Make 420 more random

---------

Co-authored-by: Usame Algan <[email protected]>
mike10ca and others added 17 commits November 28, 2024 15:12
* Add LI.FI widget

* Add theme parameter and fix redirect

* Add test coverage

* Add sanction handling and disclaimer

* Add new chip

* Simplify badge

* Remove redundant test

* Put sidebar item behind feature flag

* Fix lint

* Add geo-blocking

* Make sidebar item dependant on feature flag

* Display bridging before checking sanctions

* Fix test

* Add tracking and rename prop
- add a new recovery option for zkEmail
- proceeding with this new option selected will show a modal with some info as fake door
* feat: nested signer integration

* test: fix SignTxButton test

* feat: implement correct design

* refactor: use rtk query to load owners

* feat: new success screen for nested transactions

* refactor: move useNestedWallet to nested-safe-wallet util

* fix: design, make link external

* fix: signature indexed state for nested signing

* fix: first review issues

* fix: finish NestedTxSuccessScreen

* fix: only load ownedSafes of current chain for useNestedSafeOwners

* fix: move selected signer state into WalletProvider

* fix: error handling when signing nested tx

* refactor: extract re-used code into fields

* fix: tenderly simulation uses signer instead of wallet address, fix ExternalLinks

* fix: select available signer in SafeTxProvider, disable signers that already signed

* fix: working parent tx link for direct execution

* feat: add analytics events for nested signing

* fix: use signer address in blockaid scans

* fix: selecting initial available signer in tx modal

* test: useBlockaid.test.ts

* fix: Safe app readOnly state for nested ownership

* fix: executing txs as parent Safe

* fix: iterate signing methods for parent (hardware) wallets

* fix: only don't iterate signing of executions

* fix: use correct hash on success screen

* fix: take execution into account when selecting signer

* fix: cache pending transaction on parent creation screen

* fix: catch malformed `safeTxHash`

* fix: lint

* Improve tracking

* Add events

* Don't show status screen for singular owners

* Revert "Don't show status screen for singular owners"

This reverts commit a74606e.

* Navigate to queue if we don't have `safeTxHash`

* Fix lint

* Fix test

* Allow execution by any wallet and add transaction type to event

* Fix already signed signers being enabled

* Fix event

* Fix lint

* Address review comments

---------

Co-authored-by: Aaron Cook <[email protected]>
* Fix: replace "signer(s)" with "N signers" or "1 signer"

* maybePlural

* Use for remaining relays
* Add event labels to opening and (un-)pinning of Safe Apps

* Only prevent link from opening if never opened before
@usame-algan usame-algan requested a review from schmanu December 3, 2024 12:22
Copy link

github-actions bot commented Dec 3, 2024

Copy link

github-actions bot commented Dec 3, 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 1006.02 KB (🟡 +34 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!

Copy link

github-actions bot commented Dec 3, 2024

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements
73.64% (-0.02% 🔻)
14337/19468
🔴 Branches
51.8% (-0.01% 🔻)
3515/6786
🔴 Functions
57.04% (-0.03% 🔻)
2081/3648
🟡 Lines
75.24% (-0.02% 🔻)
13027/17315
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟢
... / useTxPendingStatuses.ts
77.5% (-0.83% 🔻)
64.06% (-1.56% 🔻)
68.18%
86.41% (-0.97% 🔻)
🔴
... / index.tsx
52% (-9.9% 🔻)
0% 0%
56.52% (-11.9% 🔻)

Test suite run success

1662 tests passing in 226 suites.

Report generated by 🧪jest coverage report action from d87151e

@liliya-soroka
Copy link
Member

please, check the address book smoke tests

Base automatically changed from release to main December 4, 2024 10:40
@katspaugh
Copy link
Member

This can be closed now thanks to #4604.

@katspaugh katspaugh closed this Dec 5, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 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.

9 participants