Bug 422673 - Navigation through the comments in the Compare editor
Summary: Navigation through the comments in the Compare editor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.2   Edit
Assignee: Guy Perron CLA
QA Contact:
URL: https://git.eclipse.org/r/19327
Whiteboard:
Keywords: contributed, noteworthy, plan
Depends on:
Blocks:
 
Reported: 2013-11-27 09:54 EST by Jacques Bouthillier CLA
Modified: 2014-02-12 14:52 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jacques Bouthillier CLA 2013-11-27 09:54:13 EST
When I use the compare editor with a  Gerrit review, I have no button selection to navigate through the comments. 2 Buttons should be added to navigate through  next/previous comments
Comment 1 Guy Perron CLA 2013-12-04 14:49:49 EST
Would you please review the code associated with the bug. 

https://git.eclipse.org/r/#/c/19327/
Comment 2 Guy Perron CLA 2013-12-09 08:47:20 EST
Hello,

all comments were addressed. If you have any further comments, please look at patch set 3 (https://git.eclipse.org/r/#/c/19327/)


Thanks

Guy Perron
Comment 3 Jacques Bouthillier CLA 2013-12-17 08:47:26 EST
The comments were addressed more than a week ago and no second round of comments were raised since. Should we expect a push to the master branch soon for this new functionality ! 
The latest Gerrit review: (https://git.eclipse.org/r/#/c/19327/)
Comment 4 Gunnar Wagenknecht CLA 2013-12-18 02:04:38 EST
I do have the patch in my workspace. However, it needs some major adjustment for getting it to work. Main reason is that there are some reflection hacks in, which I'd like to centralize into a common place.

Also, you are saving details in a static variable which is broken if you have more than two files open.
Comment 5 Guy Perron CLA 2013-12-18 10:11:56 EST
The reflection hack is centralized in the UIUtils.java class, where would be a better place ? 

Also, thanks for noticing the static variable. Is it best to fix now or add in the  next delivery that will include the dialogs (423242) for editing comments ?

Let me know

Thanks
Comment 6 Gunnar Wagenknecht CLA 2013-12-18 10:32:43 EST
I updated the review with an alternate implementation that does not require UIUtils. No action necessary from your side. :)
Comment 7 Steffen Pingel CLA 2013-12-18 16:06:33 EST
This is very nice! One thing that I noticed while trying the feature was that the annotations weren't shown (i.e. the tooltip wasn't coming up automatically) and buttons were always enabled. It would be nice if the next/previous button were only enabled when the user can actually navigate.
Comment 8 Guy Perron CLA 2013-12-19 09:19:48 EST
Hi,

I am baffled by the sudden shift with the Gerrit review (https://git.eclipse.org/r/#/c/19327/5) on this bug. After pushing, then addressing your comments and waiting approx. 10 days for the next round of inputs, now I see that the code has been swapped by an almost totalling different set of files.

What I pushed was working and demoed last week in a meeting !

Based on comment #4 all that was left to do is fix a bug and a comment… which was almost immediately followed by your file swap ?!

Is this the way to go ? It looks more to me like you are suddenly taking ownership.

Please advise

Thanks

Guy
Comment 9 Gunnar Wagenknecht CLA 2013-12-19 09:55:13 EST
Guy, sorry for the confusion. As I mentioned in comment #6, I updated the review with an alternate implementation. The code you wrote initially was a good start and worked for your meeting. However, it had a few issues so I did some research on how to best approach the problem.

I turns out that the "navigate to an annotation" problem has been solved previously by the Platform Compare team. Thus, I followed their approach. It's a bit different from the original concept but it still delivers the same functionality. The main benefits are that it uses well working code from Platform Compare and also re-uses the ReviewCompareAnnotationSupport which avoids any hacks in UIUtils. It's also a clearer architecture/code design to have the navigation centralized into the ReviewCompareAnnotationSupport class instead of being separated into different command handlers.

FWIW, the only visible change in the UI from the original concept is the integration of the buttons into the "navigation" group in the toolbar. I thought this might be better because screen readers might use this grouping which makes it more accessible. However, I don't have strong opinions on this one. We can move it back into it's own group if you like.

Again, sorry for the confusion and please don't take that as an offense. I did this while being on a train so I though having an alternate patch is a good idea for a broader discussion.
Comment 10 Steffen Pingel CLA 2013-12-19 10:27:08 EST
I think it's great that we got this functionality merged. It's very common that we iterate over changes and have multiple people involved. Sorry, if I merged this too quickly without waiting for your feedback. Please feel free to follow up with any additional changes that you would like see.
Comment 11 Jacques Bouthillier CLA 2013-12-19 11:29:02 EST
It is nice to have this functionality merged to master. It will be beneficial to all users. You proposed an alternative which is fine, but I think it would have been nice to notify GUY about it. Also, since Guy initiated the modification for this new feature, I think that GUY should have some credit about it, so it will help him to become a committer eventually to mylyn review.
Comment 12 Gunnar Wagenknecht CLA 2013-12-19 11:35:15 EST
Understood and I'm not claiming credibility for this one. Please also notice the "Also-by: Guy Perron <guy.perron@ericsson.com>" line in the commit comment which is an official Eclipse practice to mention co-authors. I also tried pushing the changed patch with Guy as the original author and myself in the "Also-by" line but Gerrit didn't allow that because I'm not a Mylyn Reviews committer myself. I'll open a bug to discuss this with the Eclipse Webmaster team.
Comment 13 Gunnar Wagenknecht CLA 2013-12-19 11:35:29 EST
MArking fixed.
Comment 14 Gunnar Wagenknecht CLA 2013-12-19 11:44:07 EST
FYI: I opened bug 424469 to discuss the upload issue with the Eclipse Webmaster team.
Comment 15 Gunnar Wagenknecht CLA 2013-12-19 11:52:14 EST
BTW, the owner of the review is still Guy Perron. Thus, he should be able to take full credibility in case of a committer nomination.
Comment 16 Sam Davis CLA 2014-01-07 18:15:19 EST
This is a great enhancement! There is one thing I'd like to see improved, though:

* The icons look a bit pixelated. Could we change them to combine the standard arrow and glasses icons without resizing them? Right now they look like they were scaled up slightly.

I can open a new bug for this if that's preferable.
Comment 17 Gunnar Wagenknecht CLA 2014-01-08 03:31:27 EST
Please open a new bug with the icons.
Comment 18 Sam Davis CLA 2014-01-09 13:35:07 EST
I've created 425218: improve next/previous comment icons
https://bugs.eclipse.org/bugs/show_bug.cgi?id=425218
Comment 19 Steve Elsemore CLA 2014-02-12 13:58:46 EST
This feature works correctly if I initiate the compare by clicking "Compare With Base".  If I initiate the compare by double clicking a file, however, the comment navigation icons are disabled and nothing I do within the compare editor causes them to become enabled.  Is this a bug?  User error?  Thanks.
Comment 20 Sam Davis CLA 2014-02-12 14:52:17 EST
It works for me. Could you try refreshing the review?

Actually, those buttons are never disabled for me, even when there are no comments.

I have noticed the following though:
428038: next/previous comment buttons not shown on plugin.xml
https://bugs.eclipse.org/bugs/show_bug.cgi?id=428038