Closed Bug 1720042 Opened 3 years ago Closed 2 years ago

Order and logic of import dialogs should be changed to allow selecting the app to import before what to import

Categories

(Thunderbird :: Mail Window Front End, defect, P1)

Thunderbird 91

Tracking

(thunderbird_esr91 wontfix)

RESOLVED FIXED
97 Branch
Tracking Status
thunderbird_esr91 --- wontfix

People

(Reporter: Thunderbird_Mail_DE, Assigned: rnons)

References

Details

Attachments

(23 files, 2 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
197.18 KB, image/png
Details
204.28 KB, image/png
Details
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

After landing Bug 271863 I would propose to change the Import dialogs order.

At the moment you've to first choose, which type of data to import. When you choose the "false" combination of data, you will not be able to find the originating application in the second dialog. IMHO this is bad UX.

So I would propose to first show the dialog to choose the originating application. The second dialog should than show the possible data types to import for the previously selected application.

A completely new dialog would probably be even better, in which the application can be selected in a left column and the possible data types are then displayed and selected directly in a right column.

Depends on: 271863

Agreed, the UX here is a bit confusing and unpolished. First dialog does not even mention that you can import from Thunderbird.

Assignee: nobody → remotenonsense
Type: enhancement → defect
Priority: -- → P1
Summary: Order and logic of import dialogs should be changed → Order and logic of import dialogs should be changed to allow selecting the app to import before what to import

This is not an easy task, in the import dialog, "Import Everything" goes to nsIMailProfileMigrator.idl, other options go to corresponding interfaces in https://searchfox.org/comm-central/source/mailnews/import/public/.

Order and logic of import dialogs should be changed to allow selecting the app to import before what to import

Importing address books and feed subscriptions are different, there is no app to select.

I suggest we rethink and rewrite it completely, maybe integrate the import/export calendar menus as well to create a central place for import/export. I would like to see some UI mock-ups before start writing any code for this.

Flags: needinfo?(alessandro)

Thanks for the UI request. I like the intention.
I'll leave the NI on as a reminder to work on this.
I'll probably bother you on matrix with a bunch of questions to better get the sense of the direction and requirements.

Attached image Import-Export.png (obsolete) —

Super rough initial mock-up to see which direction we should go.

The idea is to have the import/export in its own tab so we can easily extend it and have plenty of flexibility.
We could implement a sort of paged wizard, where the users knows where they are and how many steps are required.

Starting from selecting the supported app/software to where grab the data, and then showing a list of available data related to the selected app.

As I said, this is super rough, so if we like the direction I can create something more refined and with correct UI elements.

Flags: needinfo?(alessandro)
Attachment #9236696 - Flags: feedback?(richard.marti)
Attachment #9236696 - Flags: feedback?(remotenonsense)
Attachment #9236696 - Flags: feedback?(mkmelin+mozilla)

Comment on attachment 9236696 [details]
Import-Export.png

Well, it's not really three steps. We have two situations: #1 - import everything, from some other software or backup and #2 import something specific (feed opml file, calendar data, address book data etc.), so the 1-3 steps do not work. You only have 2 steps, or rather one + finish screen.

Attachment #9236696 - Flags: feedback?(mkmelin+mozilla)

Comment on attachment 9236696 [details]
Import-Export.png

Since we're using a new tab, seems there is enough space to list all the options we have. For the case of importing from TB, there are currently import Everything and import Mail. Is it good to just list them both on the first screen?

After selecting an option, in many cases a FilePicker is shown and then progress+finish. In other cases, we try to read the well-known locations (e.g. SeaMonkey profile location), so no FilePicker but progress+finish directly. It's possible to have only one screen, combined with an optional FilePicker dialog, and a progress+finish dialog.

Attachment #9236696 - Flags: feedback?(remotenonsense)

Comment on attachment 9236696 [details]
Import-Export.png

And how with only show the options and when the user selected one, show only this with the workflow/steps inline on the page? Then the user sees what is needed until the import is complete.

Attachment #9236696 - Flags: feedback?(richard.marti)
See Also: → 1731064

The basic flow of importing from an application is

  1. select an application
  2. select a profile dir
  3. select what to import
  4. import
Status: NEW → ASSIGNED
Attachment #9248159 - Attachment description: Bug 1720042 - Init about:import page to do importing in a tab. r=aleca,darktrojan → Bug 1720042 - Init about:import page to do importing in a tab. r=aleca
Attached image 1-Import-Export.png

Mock-up for the Import/Export tool in a tab.

Sidebar

  • Each type of import should have its own page/section, like in the preferences.
  • The Export section can be referenced at the bottom since it's part of a different context.
  • When the user selected the "Export tool" that section should be selected.

Content

  • Each section should list all available options and offer a "Cancel" and "Continue" button like a regular wizard.
  • All content should be listed here, and clicking continue should update this view rather than opening dialogs. (continue in next mock-up)
Attachment #9236696 - Attachment is obsolete: true
Attached image 2-Import-Export.png

Mock-up for the "Import from Application sections" in case the user selects "Thunderbird".

  • The section title should represent the selected application: "Import from Thunderbird".
  • All available options should be listed in a radio button list, keeping the style consistent with other setup tabs UI.
  • When selecting the Select a profile folder or Select a zip folder, a file picker field should appear inside the selected radio button container.
  • Clicking continue should replace this section and list all importable data in a checkbox list.
  • The primary button should update from "Continue" to "Proceed to Import".

During import
In this case we could use a non dismissable HTML dialog to block any interaction with the page, and show a progress bar, or our usually loading throbber with an "Importing in progress..." message.

Import error
The dialog should be dismissed and an error message should be showed in this page, without changing any selection done by the user.

Import success

  • Show a confirmation message with a list of all data imported.
  • Show 2 buttons to "Close" or "Import something else", which will clear everything and bring the user back to the first screen.

Ping, you don't need to implement all these UI elements on the first patch, you can simply use text and default elements at first, but the important things are:

  • Avoid using dialogs to show the different steps of the importing process.
  • Show/hide sections based on user's selection directly in the page.
  • Use radio buttons for a multiple choice selection.

Does this sound good? Any concerns?

Thanks, this looks much better than my patch. What does the Cancel button on the first screen do?

Closes the tab.
We will never have a situation where the Import/Export tab is the only opened standalone tab, right?

Attachment #9248159 - Attachment description: Bug 1720042 - Init about:import page to do importing in a tab. r=aleca → Bug 1720042 - Init about:import page to do importing in a tab. r=aleca,darktrojan
Target Milestone: --- → 97 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/bd5feb096c5c
Init about:import page to do importing in a tab. r=aleca,darktrojan

What items (mail, calendar, ..) to import is controlled by an ImportItems object. Will connect ImportItems to the UI in the next patch.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/3df21dced1a4
Implement ThunderbirdProfileImporter.jsm to import from a TB profile dir. r=darktrojan

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/176df8abfa09
Connect the UI of items and progress bar to ThunderbirdProfileImporter.jsm. r=darktrojan

Depends on: 1750880

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/02d8d916a1ab
Make ReadMabToDirectory in MorkImport.cpp usable from JS. r=darktrojan
https://hg.mozilla.org/comm-central/rev/652659ac28fc
Add SeamonkeyProfileImporter.jsm to import from a seamonkey profile dir. r=darktrojan

Please add ac_add_options --enable-warnings-as-errors to your mozconfig, since taskcluster has that enabled.
Landing build-bustage from the first patch soon.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/c39f0334205c
fix build bustage from "Make ReadMabToDirectory in MorkImport.cpp usable from JS.". rs=bustage-fix

Fix importing account with multiple identities.

If the source profile and current profile each has Local Folders, merge the source Local Folders as a subfolder in the current Local Folders.

Depends on D137111.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/f35c8b1668ef
Add a test for importing accounts in ThunderbirdProfileImporter.js. r=darktrojan
https://hg.mozilla.org/comm-central/rev/5e6c52ce22a2
Support merging Local Folders in ThunderbirdProfileImporter.js. r=darktrojan

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/e59a06d1be74
Add OutlookProfileImporter.jsm to import from Outlook. r=darktrojan

  • If msf files are copied, imported special folders can't be deleted
  • Also create a wrap folder when importing mail messages into Local Folders

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/d68f42124651
Ignore msf files when copying msg folders into Local Folders. r=darktrojan,benc

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/31658ddf25c9
Add BeckyProfileImporter.jsm to import from Becky. r=darktrojan
https://hg.mozilla.org/comm-central/rev/2cae1702d5b8
Add AppleMailProfileImporter.jsm to import from Apple Mail. r=darktrojan
https://hg.mozilla.org/comm-central/rev/ddc8295a77ff
Add AddrBookFileImporter.jsm, support importing from .mab file. r=darktrojan

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/67875a137059
Support importing ldif/vcard file in AddrBookFileImporter.jsm. r=benc

I played a little with the current process of importing CSV file, the field mapping dialog is really frustrating and difficult to use. D140016 doesn't implement such a filed mapping dialog, we can introduce one later if needed. It fixes bug 1392059 and bug 95087 though. This benefits two cases:

  1. if I exported an address book from TB before, now I want to import it back
  2. if I edit a csv exported from another application to have the same field names as TB's exported csv file, but not necessarily containing all TB fields
Blocks: 1757695

The backend development is almost done, please take a look. Should we improve the UI here or can we enable it on nightly first and create separate bugs to improve the UI?

Flags: needinfo?(alessandro)
Blocks: 1673483

Hmm, found a bug. If I cancelled the Account Setup with "Use Daily without an email account" selected. Then do an import and restart, all accounts are in the Account Settings page, but nothing in the folders pane. I know I can possibly toggle a pref to fix this. But as I mentioned in another bug, it's better to trust and use AccountManager as the single source of truth.

(In reply to Ping Chen (:rnons) from comment #39)

The backend development is almost done, please take a look. Should we improve the UI here or can we enable it on nightly first and create separate bugs to improve the UI?

Great work! This is exciting.
I'm okay with enabling it on daily and continue the work on a dedicated UI bug. I'm planning to do some design sessions later in the evening (my time) so you and Geoff can attend, and we can figure out things together.
Ask Geoff or Magnus for a green light on enabling this on daily, I'll test it out myself, but if it works and "it doesn't look pretty" it's totally fine :D.

(In reply to Ping Chen (:rnons) from comment #40)

Hmm, found a bug. If I cancelled the Account Setup with "Use Daily without an email account" selected. Then do an import and restart, all accounts are in the Account Settings page, but nothing in the folders pane. I know I can possibly toggle a pref to fix this. But as I mentioned in another bug, it's better to trust and use AccountManager as the single source of truth.

You can call this window.postMessage("account-created", "*");: https://searchfox.org/comm-central/rev/e643da8552065a09f203daa6b01679dadbc8b0a9/mail/base/content/msgMail3PaneWindow.js#639

In case the user imports some accounts, we need to trigger the initialization of the main 3 pane and let the code handle the reset of that pref.
Let me know if you need help with that.

Flags: needinfo?(alessandro)

(In reply to Ping Chen (:rnons) from comment #38)

I played a little with the current process of importing CSV file, the field mapping dialog is really frustrating and difficult to use.

Yeah, it is. I hope that once we're finished here we can throw it away, along with the old import dialog. I think we should build it into the import tab before or after selecting a directory to import to.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7060eae86b4a
Support importing csv/tsv file in AddrBookFileImporter.jsm. r=benc

Attachment #9266206 - Attachment is obsolete: true

The string items-pane-desc was renamed in https://hg.mozilla.org/comm-central/rev/ddc8295a77ff but the wrong element was updated to match.

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/182ecd0e8423
Fix missing string errors in about:import. r=Paenglab

Show a <csv-field-map> UI only when there are fields we don't recognize

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/fbf6bce35539
Support field mapping when importing CSV file. r=darktrojan,benc

There's a (perma?) failure in comm/mailnews/import/test/unit/test_AddrBookFileImporter.js

Flags: needinfo?(remotenonsense)

(In reply to Magnus Melin [:mkmelin] from comment #51)

There's a (perma?) failure in comm/mailnews/import/test/unit/test_AddrBookFileImporter.js

Thanks, made a fix in D140692.

Flags: needinfo?(remotenonsense)

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/33eaa9cb2560
Use the return value of startImport to control whether restart is needed. r=benc
https://hg.mozilla.org/comm-central/rev/78e0438e31cc
Fix importing CSV file in test_AddrBookFileImporter.js. r=benc

  • Use await for startImport
  • Fix .filename pref value
Blocks: 389152

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/a18600e94a02
Fix importing mab file in ThunderbirdProfileImporter.jsm. r=benc

Depends on: 1760728

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/a1bc543a4f32
Prevent error when importing servers without directory. r=benc
https://hg.mozilla.org/comm-central/rev/38a82bf025a1
Enable about:import (mail.import.in_new_tab=true). r=darktrojan

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Regressions: 1790605

Should there be a follow-up bug to remove/disable the old code, which was used in the past, when setting mail.import.in_new_tab was false ?

Flags: needinfo?(geoff)

Yeah, there should. I doubt anyone realises it's still there. Let's get it on somebody's to-do list after 115.

Flags: needinfo?(geoff)
Blocks: 1836469
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: