Skip to content

UI extension#18

Open
stefmorp wants to merge 8 commits into
masterfrom
ui-extension
Open

UI extension#18
stefmorp wants to merge 8 commits into
masterfrom
ui-extension

Conversation

@stefmorp

Copy link
Copy Markdown
Collaborator

hello @DDvO the extension with additional functions/buttons is ready, I have used it for a while and so far have had no issue. Feel free to test it yourself, of course, and to approve/merge/publish it if you like it! Ciao!

Adds a new action button that deletes both displayed contacts, wired through the window init and UI state handling, with new i18n label strings.

Made-with: Cursor
Align ADR with RFC 2426 and Thunderbird-style ;;Street;City;... vCards, keep legacy ;;;... parsing, emit Address2 via Extended field, and document parse/generate behavior.

Made-with: Cursor
Apply all editable field values from the DOM (scoped lookup under AttributesTableRows) and always persist when any fields are present, fixing Keep both / left card skips. Add comments explaining display vs raw getProperty and trade-offs.

Made-with: Cursor
vCardUtils: describe formatAdrValue (escape each ADR component, join with unescaped delimiters) and why the full composite must not pass through escapeVCardValue, which broke Thunderbird's address editor.

duplicateEntriesWindow: clarify updateAbCard — getCardFieldValues is the source of truth so Apply and Keep both always persist when the comparison table has editable rows, avoiding skipped API writes when raw card vs form comparison falsely matched.
Made-with: Cursor
… comparison table

DOM-only copy for editable fields when the left cell is empty; Apply and Keep both still handle saving. Includes i18n, window wiring, and architecture notes.

Made-with: Cursor
Save the kept column from the comparison table and delete the other contact, ignoring the keep radio. Wired in window.html, window-init, UI state, and i18n.

Made-with: Cursor
Introduces a Make different action that saves both contacts after setting a synthetic _AimScreenName built from a configurable prefix (nodupAimPrefix), the full resolved display name, and the last eight characters of the card id so same-prefix ids stay distinct. The vCard layer maps _AimScreenName to X-AIM for round-trip persistence through contacts.update.

Also wires the new button in the duplicate window UI and locales, trims verbose address book loading logs, and updates test VCF fixtures.

Made-with: Cursor
Bump the add-on version to 2.2.4 in manifest.json and align install.rdf so legacy packaging metadata matches the WebExtension release line.

Duplicate-finder toolbar (window.html): reorder action buttons to Skip, Make different, Keep both, Remove one, Remove left, Remove both, Remove right, Merge left (Start unchanged at the front). This matches the flow many users follow when splitting pairs before keeping or deleting.

Locales (all shipped languages): drop the trailing " >" from duplicate-action button labels so the bar is more compact; English already uses "Remove one" for the applynextbutton string key while the code id stays applynextbutton.

duplicateEntriesWindowUI.js: mirror the same button order in showReadyState, showDuplicatePairState, disableDuplicateActionButtons, and showFinishedState so visibility and enable/disable calls stay consistent with the DOM and easier to maintain.

vCardUtils.js: document at file level and at parse/emit sites that X-AIM is mapped to _AimScreenName for AIM screen names, including use by Make different and the duplicate search loop when AIM differs.

ARCHITECTURE_AND_HISTORY.md: fix stale Contacts module exports (remove non-existent getCardProperty/setCardProperty); document nodupAimPrefix, X-AIM, AIM skip in search, Make different and fixed-column remove actions, merge-left persistence via Remove one or Keep both, two-save behavior and saveCard logging; replace the temporary "Current development" note with a proper Version 2.2.4 change-history section.

Test data: no new edits in this commit; fixture updates for near-duplicate / AIM scenarios were already included in the earlier Make different commit on this branch.

The built XPI (duplicateContactsManager-2.2.4.xpi) remains gitignored by *.xpi; rebuild with build-xpi.ps1 after version changes.

Made-with: Cursor
@DDvO

DDvO commented May 26, 2026

Copy link
Copy Markdown
Owner

Hello @stefmorp thank you for your update of April 19th and for your PR with a gentle reminder yesterday.
Sorry for not responding earlier - I was very busy, but this and next week I am on vacation and have some more time.

I just tried out the changes with the new buttons. Most of them look pretty good.
Yet here are a couple of things I noticed to be not ideal:

  • When using the "Merge left" button, please make sure that the left side is marked as to be kept.
  • The "Make different" button works, but in a way that cannot be un-done, at least with my rather new TB version (150.0.2) on macOS:
    As intended, the new entries do not show up anymore in the extension comparison, so the AIM name cannot be changed there,
    but the new _AimScreenName field is not shown in the regular editor either, so no chance to see and adapt the new values automatically placed there.
    Hope the value placed can be set to a format that is editable in the TB address book, maybe using the other: syntax?
    Looks like the AIM name handling by TB is somewhat broken - for instance, it does not export any such names.
  • A regression that I did not notice before but that was present already in version 2.2.2: the "Fields to consider" list is not editable anymore.
  • commit 7f267fe changes the debug: method to do nothing, and various console.log() calls are removed. While I agree to making console output less verbose by default, I suggest to
    keep the debug() method content console.log(str); but just comment it out, and
    transform the removed console.log() calls to debug() calls (to keep the output, in case needed laster)
    such that the diagnostic output can be re-enabled if wanted later.
  • the lines in commit messages must not be overlong (so should be split after, e.g., at most 100 char),
    otherwise they are truncated when viewed, e.g., in a terminal
  • maybe more comments on the commits; I did not manage to fully review them today.

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