Skip to content

Conversation

GVodyanov
Copy link
Contributor

@GVodyanov GVodyanov commented Aug 25, 2025

Introduces sorting for addressbooks. This sorting is applied wherever addressbooks have to be listed, so in contacts settings, contact details editor, and the contact cloning modal.

The sorting rules are the following:

  1. First group: Default personal addressbook (id === "contacts")
  2. Second group: Recently used (based on lastUsedAddressBooks, stored in localstorage with key addressbook-accesses) go second, ordered from newest to oldest
  3. Third group: Writeable enabled contacts, sorted by the amount of contacts they have, from more to less
  4. Fourth group: Read-only enabled contacts, sorted by the amount of contacts
  5. Fifth group: Disabled contacts, sorted by the amount of contacts

EDIT THIS IS THE PR FOR THIS NOW #4659

It also fixes a bug where when modifying the addressbook of a contact caused the app to break by introducing an addressbook with an id of undefined

@GVodyanov GVodyanov self-assigned this Aug 25, 2025
Copy link

codecov bot commented Aug 25, 2025

Codecov Report

❌ Patch coverage is 0% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.66%. Comparing base (66f0ea1) to head (50c8d95).

Files with missing lines Patch % Lines
src/store/addressbooks.js 0.00% 23 Missing and 10 partials ⚠️
src/components/ContactDetails.vue 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #4643       +/-   ##
============================================
- Coverage     65.71%   9.66%   -56.06%     
  Complexity      266     266               
============================================
  Files            26     126      +100     
  Lines           773    6363     +5590     
  Branches          0    1194     +1194     
============================================
+ Hits            508     615      +107     
- Misses          265    5617     +5352     
- Partials          0     131      +131     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GVodyanov GVodyanov force-pushed the feat/addressbook-sorting branch 2 times, most recently from 3c5ada0 to f7cfaab Compare August 28, 2025 10:24
@GVodyanov GVodyanov added the 3. to review Waiting for reviews label Aug 28, 2025
@GVodyanov GVodyanov marked this pull request as ready for review August 28, 2025 10:29
@GVodyanov GVodyanov requested a review from hamza221 as a code owner August 28, 2025 10:29
@GVodyanov GVodyanov force-pushed the feat/addressbook-sorting branch from f7cfaab to 5647a80 Compare August 28, 2025 10:46
@hamza221
Copy link
Contributor

Can you split into 2 commits please ? so we can backport the fix

Signed-off-by: Grigory Vodyanov <[email protected]>
@GVodyanov GVodyanov force-pushed the feat/addressbook-sorting branch from 5647a80 to 50c8d95 Compare August 28, 2025 11:20
@GVodyanov
Copy link
Contributor Author

Can you split into 2 commits please ? so we can backport the fix

Good idea! Here's another PR #4659

@GVodyanov GVodyanov changed the title Implement addressbook sorting and fix addressbook-related vue3 regressions Implement addressbook sorting Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants