Community
Participate
Working Groups
Next feature connected with Pull Request
test comment
Test comment
Test comment2
https://github.com/edytaprzymus/orion.client/commit/7f9b74c03c25491883be9a1d73eafbf20012061a My commit with initial solution
I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
Adding a comment via Commit page should be smarter than just a dialog with bug no and comment. It should help adding comments while reviewing changes. 1) the commit number or even url should be added automatically to the comment 2) when we review a change in the commit, we should be able to add comments just per this change. Then all comments will be aggregated into one Bugzilla comment, for instance: commit [commit name] or commit url [commit url] [General comment] - bundles/org.eclipse.orion.client.core/web/orion/commands.js [comment for change 1] - bundles/org.eclipse.orion.client.core/web/orion/something.js [comment for change 2] etc. 3) when comment is added we should have indicator for that, maybe just part of the comment should be visible... 4) comment handlers should be pluggable. For now I would imagine that comment handler definition would contain: - bugzilla url e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=[bug no] - bugzilla query for updating comment https://bugs.eclipse.org/bugs/process_bug.cgi?id=[bug no]&comment=[comment] - name From now devs would need to add bugzilla url to commit comment. It would be used to find the right comment handler. If there is no such url, reviewer would need to select from the list of available comment handlers. That's just an idea. Let me know what you think.
> From now devs would need to add bugzilla url to commit comment. It would be used > to find the right comment handler. Maybe we should add bug/issue url field to the commit dialog?
Comment generated from Orion about commit a4bd96634b2f5cbd0405f27e9888b50b77d7450cbundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.jsComment about the changebundles/org.eclipse.orion.client.git/web/orion/git/widgets/ConfirmPushDialog.jsbundles/org.eclipse.orion.client.git/web/orion/git/widgets/RemotePrompterDialog.jsbundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ConfirmPushDialog.html
Comment generated from Orion about commit a4bd96634b2f5cbd0405f27e9888b50b77d7450cgeneral commentbundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.jsDetailed comment
Comment generated from Orion about commit a4bd96634b2f5cbd0405f27e9888b50b77d7450c General commentbundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js Detailed comment1 bundles/org.eclipse.orion.client.git/web/orion/git/widgets/RemotePrompterDialog.js Detailed comment2
Comment generated from Orion about commit a4bd96634b2f5cbd0405f27e9888b50b77d7450c General comment about commit bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ConfirmPushDialog.js Detailed comment about changed file bundles/org.eclipse.orion.client.git/web/orion/git/widgets/templates/ConfirmPushDialog.html Detailed comment about changed file
Created attachment 219822 [details] General comment + detailed comments about files
https://github.com/edytaprzymus/orion.client/commit/323c4ef6acad4a58614d0450d7ad63e1e8fe7ae9 This is the solution illustrated by attached screenshot. Is someone able to clean up my "Test comments" - sorry for messing this bug, but I wanted to test my feature.
(In reply to comment #12) > Created attachment 219822 [details] > General comment + detailed comments about files I rather meant "Comment" action per each change + "General Comment" at the top. Then clicking "Send Comment" would show you the preview. After clicking "Ok" the comment would be sent to Bugzilla. You would be prompted when leaving the commit page with unsent comments. Something like that....
Comment about commit a4bd96634b2f5cbd0405f27e9888b50b77d7450c General comment Comment about change bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js comment1 Comment about change bundles/org.eclipse.orion.client.git/web/orion/git/widgets/ConfirmPushDialog.js comment2
Now let's convert it into an Orion plug-in.
What does it mean convert it into plugin? Do I have to remove whole code from orion files and put it into separate file that will be installed as plugin when somebody wants use this feature?
Comment about commit a084a08bb7f1cd6fa349ab0cf90d1d52341c674b general comment Comment about change bundles/org.eclipse.orion.client.core/LabeledCheckbox.js detailed comment 1
https://github.com/edytaprzymus/orion.client/commit/8610b04696e6273e9819c80da11a5932c87b932a I created orion service from the code written previously. Please let me know if it's done properly.
(In reply to comment #19) > https://github.com/edytaprzymus/orion.client/commit/8610b04696e6273e9819c80da11a5932c87b932a > I created orion service from the code written previously. Please let me know if > it's done properly. I meant something else. See for instance "orion.navigate.command" extension in https://github.com/szbra/szbra.github.com/blob/master/solutions/exercise2and5-markdown-renderer/markdownPlugin.js As you see services in plug-ins can not build UIs. I think our service should look like this: provider.registerServiceProvider("orion.git.bugzilla", { getCommentUrl: function(item) { return anchor.href + "#" + item.Location; } }, { name: "Eclipse.org Bugzilla", id: "org.eclipse.bugzilla.blah", pattern:"bugs.eclipse.org?bugNo=[number]" } }); And if this plug-in is available and the commit comment matches the service pattern, we should show comment areas. Then "Post comment" should call "getCommentUrl" to get the url to redirect.
http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/orion.client.git_c42363f26a168861b08b69a3d4aa853c8501fd91
(In reply to comment #21) > http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/ > orion.client.git_c42363f26a168861b08b69a3d4aa853c8501fd91 Comments: - all new buttons should be replaced with actions/commands - the "add comment" url should be returned by the plug-in. I think the service should have a method that gets the bug url/number + comments to add and returns the url to redirect We need also to address the case when there is "Bug XXX" in the comment and no bug url. Maybe we should have an extra field in the service with a list of optional patterns. Then if we can't find a service using the primary pattern, we will try to scan the comment for optional patterns. Then on Post Comment, Orion would ask which service you should use. Example: service1 = {pattern:bugs.eclipse.org?bugId=[no]: optionalPattern:Bug [no]} service2 = {pattern:bugs.orion.org?bugId=[no]: optionalPattern:Bug [no]} If the commit comment contains bugs.eclipse.org?bugId=12, service1 will be used. If the commit comment contains Bug 12, you'll be asked where to send the comment on Post Comment.
(In reply to comment #22) And please remove unused files from the commit like gitComments.js. Thanks.
http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/orion.client.git_f9258b168abd2b0553cb3f66385dd3e302542e1b
Please rebase the branch on top of master.
http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/orion.client.git_4aa378c4573d95bf6e5abe8accb7549294c6b9a1
(In reply to comment #27) > http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/ > orion.client.git_4aa378c4573d95bf6e5abe8accb7549294c6b9a1 Comments: - "Post Comment" dialog should just say "You cannot post empty comment. Please add comments for the commit and try again" and there is no need to show bug number, Bugzillaz to choose etc. - "Ok" on the dialog should be renamed to "Submit" and move to the right as on other dialogs - Please add padding around the "General comment" - The list of Bugzillas should contain names, not URLs - in the service there should be a method to compute "add comment url" instead of "returnUrl", the method should return complete url to redirect - if there is url in the commit comment, "Post Comment" dialog should show anyway where we are going to post the comment - the preview on "Post Comment" dialog should be a text area, would be nice if it was expandable
Comments to teh latest commit: > - "Post Comment" dialog should just say "You cannot post empty comment. Please > add comments for the commit and try again" and there is no need to show bug > number, Bugzillaz to choose etc. Show it as a label, not in the text area. > - in the service there should be a method to compute "add comment url" instead > of "returnUrl", the method should return complete url to redirect Not fixed. Moreover when some comments are added and one is leaving the page, he should get a prompt to confirm he wants to leave the page and abandon comments.
(In reply to comment #29) Moreover you overrode changes made by Maciek in gitCommands.js in addRemoteReviewRequestCommand. Please fix it.
http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/orion.client.git_84edb23b421bdcb6db0b6d0a44d4bb8c21e7c292 Here is the commit rebased on the top of the master. I still didn't implement plugin with function - I managed to create these methods, but since they return deffered object there is plenty of work to make this work and sincerely - I am not sure if it's worth it. I create warning when unposted comments exists and changed warning about empty comment to slideout. I didn't get whant did you mention about Maciek's changes - I didn't get any conflicts while rebasing.
(In reply to comment #31) > I still didn't implement plugin with function - I managed to create these > methods, but since they return deffered object there is plenty of work to make > this work and sincerely - I am not sure if it's worth it. But I am. Please do. > I didn't get whant did you mention about Maciek's changes - I didn't get any > conflicts while rebasing. See gitCommands.js in your commits (the previous and the latest one) lines 2082, 2159-2168. I'm not sure how you can't see it.
http://orion.eclipse.org/git/reviewRequest.html#git@github.com:edytaprzymus/orion.client.git_e2a195afae1c219a7303e9bbc3fd54f46671d6c1
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg03444.html