Bug 507106 - Don't ask strange questions before showing revision info for the first time
Summary: Don't ask strange questions before showing revision info for the first time
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.7 M4   Edit
Assignee: Andrey Loskutov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-05 14:40 EDT by Andrey Loskutov CLA
Modified: 2016-11-07 09:56 EST (History)
3 users (show)

See Also:


Attachments
annoying dialog (18.93 KB, image/png)
2016-11-05 14:40 EDT, Andrey Loskutov CLA
no flags Details
svn and git version annotations together (272.85 KB, image/png)
2016-11-06 11:50 EST, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Loskutov CLA 2016-11-05 14:40:46 EDT
Created attachment 265211 [details]
annoying dialog

Follow up on this question: https://dev.eclipse.org/mhonarc/lists/egit-dev/msg04212.html

"everytime, I activate the Git blame annotations, I get the attached dialog.
I must admit that I do not know what this dialog is trying to tell me
and I assume most users will experience the same.
Do you know what the purpose of this dialog is? Maybe we should remove it?"

I've never ever NOT confirmed this dialog, and because I was so used to see it I've never asked "why in the hell it is popping at all"? If there is a 1% of users who needs this dialog for whatever reason, then we should make them happy by making this preference option visible under "General -> Editors-> Text Editors -> Quick Diff", the rest of 99% users just want to see revision information, because they clicked on "Show Revision Information".

See org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants.REVISION_ASK_BEFORE_QUICKDIFF_SWITCH
org.eclipse.ui.internal.texteditor.LineNumberColumn.ensureQuickDiffProvider(String)

This dialog (and option above) were introduced together with VCS support in the ruler annotations via bug 113136. At that time people were not used to it,so there were some concerns if this is useful or not, but I see no comments asking for that dialog.

I would propose to flip the default without adding another strange option to the preferences.
Comment 1 Eclipse Genie CLA 2016-11-05 15:12:13 EDT
New Gerrit change created: https://git.eclipse.org/r/84523
Comment 2 Lars Vogel CLA 2016-11-05 15:58:57 EDT
+1 for not showing the result.

@Andrey thanks for taking this.
Comment 3 Matthias Sohn CLA 2016-11-06 04:05:37 EST
I think the reason for this dialog is the following:

Quick diff's reference source configured here
"Preferences > General > Editors > Text Editors > Quick Diff"
seems to be a global workspace level setting (couldn't find it in project specific settings).

If a user uses different versioning systems (e.g. Git and Subversion) for different projects in the same workspace he has to decide on global level which one to use as quick diff reference source. I guess this means quick diff will only work for the projects using the selected versioning system (e.g. git) but won't work for the projects using another versioning system (e.g. Subversion) in the same workspace. I guess that's the reason why this dialog is shown.

If this assumption is correct it seems the best way to get rid of this dialog would be to provide a project specific quick diff preference page which would allow to store the quick diff reference source on project level.
Comment 4 Andrey Loskutov CLA 2016-11-06 04:45:03 EST
(In reply to Matthias Sohn from comment #3)
> I think the reason for this dialog is the following:
> 
> Quick diff's reference source configured here
> "Preferences > General > Editors > Text Editors > Quick Diff"
> seems to be a global workspace level setting (couldn't find it in project
> specific settings).
> 
> If a user uses different versioning systems (e.g. Git and Subversion) for
> different projects in the same workspace he has to decide on global level
> which one to use as quick diff reference source. I guess this means quick
> diff will only work for the projects using the selected versioning system
> (e.g. git) but won't work for the projects using another versioning system
> (e.g. Subversion) in the same workspace. I guess that's the reason why this
> dialog is shown.

This was my initial guess too, but looking at LineNumberColumn.ensureQuickDiffProvider() logic this will just change to the requested diff provider id (with a meaningless dialog).

So we have either a quick diff based on editor buffer changes since opening the editor or quick diff based on version control data (for the current file), and switching to the version control opens the dialog. Interestingly, switching back to the "editor buffer" quick diff is done *without dialog* after using menu to "hide" revision information.
Comment 5 Dani Megert CLA 2016-11-06 11:04:52 EST
Bug 319347 is your friend. Investing time to fix this will be a better help to users than just not giving them any hint.

If the wording on the current dialog is not understandable then we should fix that.
Comment 6 Andrey Loskutov CLA 2016-11-06 11:50:15 EST
Created attachment 265213 [details]
svn and git version annotations together

(In reply to Dani Megert from comment #5)
> Bug 319347 is your friend. Investing time to fix this will be a better help
> to users than just not giving them any hint.

I'm not sure what isn't working there, I can have both SVN and Git version annotations at same time nicely together, without configuring anything special, see attached picture. As said, the code in LineNumberColumn.ensureQuickDiffProvider() just uses the provider it was asked to show. May be I'm missing something here? 

It seems for me that we mix two different things - quick diff for *changed lines* (which is supposed to be configured with global preferences mentioned in bug 319347) and version annotations, which are kind of orthogonal to the quick diff and do not have global configuration, but based on the current project team provider?
Comment 7 Dani Megert CLA 2016-11-07 04:52:47 EST
(In reply to Andrey Loskutov from comment #6)
> Created attachment 265213 [details]
> svn and git version annotations together
> 
> (In reply to Dani Megert from comment #5)
> > Bug 319347 is your friend. Investing time to fix this will be a better help
> > to users than just not giving them any hint.
> 
> I'm not sure what isn't working there, I can have both SVN and Git version
> annotations at same time nicely together, without configuring anything
> special, see attached picture. As said, the code in
> LineNumberColumn.ensureQuickDiffProvider() just uses the provider it was
> asked to show. May be I'm missing something here? 
> 
> It seems for me that we mix two different things - quick diff for *changed
> lines* (which is supposed to be configured with global preferences mentioned
> in bug 319347) and version annotations, which are kind of orthogonal to the
> quick diff and do not have global configuration, but based on the current
> project team provider?

Yes, they are orthogonal but they use the same space in the ruler.


I looked at this again today and verified that we only change the provider for the given editor - it leaves the global preference alone. I agree that everyone who wants to see the revision information will OK that dialog and also wants to remember the decision.
Comment 8 Matthias Sohn CLA 2016-11-07 05:53:50 EST
(In reply to Dani Megert from comment #7)
> (In reply to Andrey Loskutov from comment #6)
> > Created attachment 265213 [details]
> > svn and git version annotations together
> > 
> > (In reply to Dani Megert from comment #5)
> > > Bug 319347 is your friend. Investing time to fix this will be a better help
> > > to users than just not giving them any hint.
> > 
> > I'm not sure what isn't working there, I can have both SVN and Git version
> > annotations at same time nicely together, without configuring anything
> > special, see attached picture. As said, the code in
> > LineNumberColumn.ensureQuickDiffProvider() just uses the provider it was
> > asked to show. May be I'm missing something here? 
> > 
> > It seems for me that we mix two different things - quick diff for *changed
> > lines* (which is supposed to be configured with global preferences mentioned
> > in bug 319347) and version annotations, which are kind of orthogonal to the
> > quick diff and do not have global configuration, but based on the current
> > project team provider?
> 
> Yes, they are orthogonal but they use the same space in the ruler.
> 
> 
> I looked at this again today and verified that we only change the provider
> for the given editor - it leaves the global preference alone. I agree that
> everyone who wants to see the revision information will OK that dialog and
> also wants to remember the decision.

so you agree to remove this dialog ?
Comment 9 Dani Megert CLA 2016-11-07 06:01:56 EST
(In reply to Matthias Sohn from comment #8)
I already merged Andrey's change. Genie is currently not updating (see bug 507135).
Comment 10 Lars Vogel CLA 2016-11-07 07:44:40 EST
(In reply to Dani Megert from comment #9)
> (In reply to Matthias Sohn from comment #8)
> I already merged Andrey's change. Genie is currently not updating (see bug
> 507135).

Great work Andrey. Another (little) improvement in usability for our Eclipse users.