Bug 500051 - Add option to import/export preferences from Preference Dialog
Summary: Add option to import/export preferences from Preference Dialog
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.8 M4   Edit
Assignee: Lucas Bullen CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy, usability
Depends on:
Blocks: 500127 537867
  Show dependency tree
 
Reported: 2016-08-22 05:40 EDT by Mickael Istria CLA
Modified: 2018-08-13 10:27 EDT (History)
4 users (show)

See Also:


Attachments
Screenshot of the preference dialog footer (12.64 KB, image/png)
2017-11-03 08:04 EDT, Andreas Sewe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2016-08-22 05:40:02 EDT
Very few people seem to be aware of the ability to import/export/share Eclipse preferences. We should add to the 
WorkbenchPreferenceDialog dialog a shortcut to Import/Export preferences. Similarly to what Oomph does, it could be some buttons added nearby the help button.
Comment 1 Lars Vogel CLA 2016-08-22 05:44:02 EDT
+1 for the idea

Side note: I think the option to handle preferences across installations should be provided by platform. Currently Oomph provides this but IMHO this should be a Platform feature.
Comment 2 Mickael Istria CLA 2016-08-22 06:23:10 EDT
(In reply to Lars Vogel from comment #1)
> Side note: I think the option to handle preferences across installations
> should be provided by platform. Currently Oomph provides this but IMHO this
> should be a Platform feature.

AFAIK, on the long run, there are plans to have users store their preferences in the cloud via user storage (most likely provided by MPC). The format of the preferences could be either the one from Platform export, or the one from Oomph.

I don't think going to the cloud is the responsibility of Platform, but providing the import/export as smoothly -both from UI and APIs- as possible would make sense for such future stories.
Comment 3 Eclipse Genie CLA 2017-09-26 11:14:59 EDT
New Gerrit change created: https://git.eclipse.org/r/105792
Comment 5 Mickael Istria CLA 2017-10-02 13:22:52 EDT
Thanks a lot Lucas! Can you please add an entry about it in the N&N (with a small screenshot of those new buttons)?
Comment 6 Eclipse Genie CLA 2017-10-05 10:08:40 EDT
New Gerrit change created: https://git.eclipse.org/r/106296
Comment 8 Mickael Istria CLA 2017-10-05 10:58:33 EDT
Thank you Lucas!
Comment 9 Lars Vogel CLA 2017-10-11 14:45:30 EDT
Lucas, the icons look fuzzy for me on Linux? How did you create them?
Comment 10 Lucas Bullen CLA 2017-10-11 15:05:26 EDT
(In reply to Lars Vogel from comment #9)
> Lucas, the icons look fuzzy for me on Linux? How did you create them?

I use the same logos that are present in the File dropdown menu. I am able to include a higher resolution version of the image.
Comment 11 Lars Vogel CLA 2017-10-11 15:14:59 EDT
(In reply to Lucas Bullen from comment #10)
> (In reply to Lars Vogel from comment #9)
> > Lucas, the icons look fuzzy for me on Linux? How did you create them?
> 
> I use the same logos that are present in the File dropdown menu. I am able
> to include a higher resolution version of the image.

Looks to me that they are resized, at least they appear larger to me. If that is the case you should create larger versions of them and use these. You find the svg versions in the eclipse.platform.images repo.
Comment 12 Eclipse Genie CLA 2017-10-16 15:06:56 EDT
New Gerrit change created: https://git.eclipse.org/r/110159
Comment 14 Andreas Sewe CLA 2017-11-03 08:04:51 EDT
Created attachment 271315 [details]
Screenshot of the preference dialog footer

(In reply to Lars Vogel from comment #11)
> Looks to me that they are resized, at least they appear larger to me. If
> that is the case you should create larger versions of them and use these.
> You find the svg versions in the eclipse.platform.images repo.

Reopening, because at least for the Java EPP package (presumably every package with Oomph installed), this doesn't look good yet.

The attached screenshot IMHO shows several problems:

- The separator between import and export seems out of place, as Oomph's preference recorder doesn't add one.

- The import / export icons don't fit the circle look of both (?) and the preference recorder.

- The icons look a bit large

IMHO, the optimal layout would be

  (?) | (record) import export                   [Cancel] [Apply and Close]

but I'm not sure how hard it would be for an external contributor (Oomph) to control its own placement.

An alternative placement would be 

  (?) | (record)                   import export [Cancel] [Apply and Close]

What do you think?
Comment 15 Dani Megert CLA 2017-11-03 11:24:27 EDT
This thing has a big usability issue: it does not export what the user sees in the preference dialog. Instead, it exports the currently saved preferences. So, if I go and choose my desired preferences and then export, it will not export them!

The command must detect unsaved changes and then ask the user to either apply them or ignore them during the export.
Comment 16 Lucas Bullen CLA 2017-11-03 11:34:02 EDT
(In reply to Dani Megert from comment #15)
> This thing has a big usability issue: it does not export what the user sees
> in the preference dialog. Instead, it exports the currently saved
> preferences. So, if I go and choose my desired preferences and then export,
> it will not export them!
> 
> The command must detect unsaved changes and then ask the user to either
> apply them or ignore them during the export.

I would relate this to Bug 507411. Without a way to detect unsaved changes, we could have a dialog warning that non-applied changes will not be exported and have the option to apply them there.
Comment 17 Dani Megert CLA 2017-11-03 11:59:06 EDT
(In reply to Lucas Bullen from comment #16)
> (In reply to Dani Megert from comment #15)
> > This thing has a big usability issue: it does not export what the user sees
> > in the preference dialog. Instead, it exports the currently saved
> > preferences. So, if I go and choose my desired preferences and then export,
> > it will not export them!
> > 
> > The command must detect unsaved changes and then ask the user to either
> > apply them or ignore them during the export.
> 
> I would relate this to Bug 507411. Without a way to detect unsaved changes,
> we could have a dialog warning that non-applied changes will not be exported

OK.

> and have the option to apply them there.

Not sure what you mean by "apply them there".
Comment 18 Lucas Bullen CLA 2017-11-03 12:07:04 EDT
(In reply to Dani Megert from comment #17)

> Not sure what you mean by "apply them there".

Have the popup dialog say "All unapplied changes to preferences will not be exported" with the options to "Continue" or "Apply"
Comment 19 Dani Megert CLA 2017-11-03 12:15:30 EDT
(In reply to Lucas Bullen from comment #18)
> (In reply to Dani Megert from comment #17)
> 
> > Not sure what you mean by "apply them there".
> 
> Have the popup dialog say "All unapplied changes to preferences will not be
> exported" with the options to "Continue" or "Apply"

I see. In that case it should be "Apply and Continue".

Note that there are further usability issues ahead: some preference changes open a dialog asking for a full build.
Comment 20 Mickael Istria CLA 2017-11-06 10:23:00 EST
(In reply to Andreas Sewe from comment #14)
> What do you think?

It's not possible from Platform to control where Oomph places the recorder icon. About the separator, then it would be more up to Oomph to add one in its dialog extension if we think it's better. That's something we could contribute.
I agree the icons may seem a bit too large, they are in the standard size of a menu icon (16x16) AFAIK. We could use some smaller ones there.
About moving the Import/Export closer to "cancel" and "apply and close", I think it would be confusing as the later ones do control the dialog lifecycle whereas the import/export are "just" links to another dialog so they wouldn't really fit together.
I believe leaving them located as they are right now and cleaning stuff a bit (smaller size, add a separator to Oomph...) is a low-hanging fruit whereas other approaches may be riskier and harder.

(In reply to Dani Megert from comment #15)
> The command must detect unsaved changes and then ask the user to either
> apply them or ignore them during the export.

As mentioned by Lucas, there is already an issue about it and it's close from being impossible to fix across all preference pages. So we shouldn't count on such detection to improve the workflow.
I like the idea of a confirmation popup when exporting to warn users.
Comment 21 Eclipse Genie CLA 2017-11-06 13:44:06 EST
New Gerrit change created: https://git.eclipse.org/r/111087
Comment 23 Mickael Istria CLA 2017-11-16 16:52:29 EST
Should be better now.
If anyone has any concern, please create new bugs and link to this one rather than reopening as reopening makes it harder to track what's done and missing milestone after milestone.
Thanks a lot Lucas and others!
Comment 24 Dani Megert CLA 2017-11-20 12:09:25 EST
"If there are any unapplied changes to preferences, they will not be exported"

Is too complicated to parse.

I've replaced it with:
"Unapplied changes to preferences will not be exported."