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

Refactor: address input #83

Merged
merged 19 commits into from
Oct 15, 2024
Merged

Conversation

UrbanWill
Copy link
Collaborator

@UrbanWill UrbanWill commented Sep 19, 2024

Description

Depends on: #82
Issue: #79

  • Refactored AddressInput to be a standalone component responsible for infinite fetching and searching contacts related data, this was the final requirement to get rid of the address watcher pattern.
  • Improved UX in AddressInput
  • Refactored AddressBookTable to handle unpaid Organizations without relying on AddressBookWatcher
  • Removed AddressBookWatcher, which queried up to 1000 Contacts with categories & subcategories.
  • Removed unused address-book related functions

🖼️ Screenshots:

AddressInput

Screen.Recording.2024-09-21.at.15.31.37.mov

AddressBook free organization plan view

  • Before: A very long scrollable list that required all contacts data
  • After: A paginated list that only fetches the required data
Screen.Recording.2024-09-21.at.15.36.55.mov

Copy link

vercel bot commented Sep 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
polkadot-multisig ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 8:25am
signet-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 8:25am

@@ -5,9 +5,9 @@ export const useOnClickOutside = (element: HTMLElement | undefined | null, cb: (
function handleClickOutside(event: MouseEvent) {
if (element && !element.contains(event.target as Node)) cb()
}
document.addEventListener('click', handleClickOutside)
document.addEventListener('mousedown', handleClickOutside)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TIL mousedown works best because it waits for events to fully propagate.

@UrbanWill UrbanWill changed the title Refactor: WIP address input Refactor: address input Sep 23, 2024
@chrisling-dev chrisling-dev changed the base branch from main to refactor/useKownAddresses October 15, 2024 06:51
Copy link
Collaborator

@chrisling-dev chrisling-dev left a comment

Choose a reason for hiding this comment

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

LGTM

apps/multisig/src/layouts/AddressBook/AddContactModal.tsx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants