Bug 377630 - "Generate Link" on the compare widget
Summary: "Generate Link" on the compare widget
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Git (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.5 M2   Edit
Assignee: libing wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 377010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-25 10:03 EDT by Szymon Brandys CLA
Modified: 2012-05-22 17:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2012-04-25 10:03:01 EDT
I think we could just place a link to the compare view instead of "Generate Link" command. If we use a link, we can easily copy it by using "Copy Link Location" on FF or an equivalent on other browsers.
Comment 1 Susan McCourt CLA 2012-04-25 11:57:04 EDT
Yes, make sense.
We had the old "compare" link before we had the switcher.
Now we'll have a switcher.
So we may as well make the "Compare" link specific to whatever change is highlighted in the viewer.  Then the user can open it or copy link.
Comment 2 Susan McCourt CLA 2012-04-25 12:17:37 EDT
I wonder if "Compare" link would be confusing.  If the tooltip is  "Show in compare view" do you think that's good enough?
Comment 3 libing wang CLA 2012-04-25 16:31:42 EDT
The original purpose of this was just to generate the "where your current diff  are" because even if you are already in the compare page the URL does not include your diff position.

If you are embedding compare widget I think this "generate link" command can just bring you to the compare page with diff position.
If you are already in a compare page and you still want to know the URL with diff position, it will look funny to "Show in compare view". Maybe in this case we still want to just pop up a string like it is doing now.
Comment 4 libing wang CLA 2012-04-25 16:34:54 EDT
(In reply to comment #3)
> The original purpose of this was just to generate the "where your current diff 
> are" because even if you are already in the compare page the URL does not
> include your diff position.
> 
> If you are embedding compare widget I think this "generate link" command can
> just bring you to the compare page with diff position.
Correct my last statement. "generate link" should be "Open compare page" or something like that.
Comment 5 Szymon Brandys CLA 2012-04-29 05:30:31 EDT
(In reply to comment #4)
> Correct my last statement. "generate link" should be "Open compare page" or
> something like that.

Or "Show/View compare page". However for links to Git Status and Log pages we decided not to use "Show.." in the link label. They used to be "Show Git Log" and "Show Git Status". So just "Compare View" or "Full Compare View" would be consistent.
Comment 6 Susan McCourt CLA 2012-04-30 12:11:52 EDT
(In reply to comment #5)
> (In reply to comment #4)
> > Correct my last statement. "generate link" should be "Open compare page" or
> > something like that.
> 
> Or "Show/View compare page". However for links to Git Status and Log pages we
> decided not to use "Show.." in the link label. They used to be "Show Git Log"
> and "Show Git Status". So just "Compare View" or "Full Compare View" would be
> consistent.

What we have done in those cases is use the page title as the link.
So "Show Git Status" became "Git Status" with a "Open xxx....." tooltip.

So I think we could have
"Compare" with tooltip "Open the compare page"

I think if we are going to talk about the page/view as a noun, we should call it "page" since it's a link to a new page.
Comment 7 Susan McCourt CLA 2012-05-22 12:30:52 EDT
Can we do something about this for 0.5?
I think that "Generate Link" in git status 2 looks pretty odd.
Could we instead make it "Compare" with tooltip "Open the compare page"?

I realize that this will seem weird when the widget is already hosted in the compare page, but it seems like the compare page is the special case and could make its own command (generate link) for that case, with the widget being able to provide the link of the current change.
Comment 8 libing wang CLA 2012-05-22 13:36:22 EDT
(In reply to comment #7)
> Can we do something about this for 0.5?
> I think that "Generate Link" in git status 2 looks pretty odd.
> Could we instead make it "Compare" with tooltip "Open the compare page"?
Yes, we can do this. Further, the compare page will contain the current diff block+change position where your status or commit page already located on.
But we need a "tool" instead of "button" when rendering command. Not sure if we can render the mix of toll and button in the same command span. 

> 
> I realize that this will seem weird when the widget is already hosted in the
> compare page, but it seems like the compare page is the special case and could
> make its own command (generate link) for that case, with the widget being able
> to provide the link of the current change.

Yes, we will keep "generate link" in this case, which is easy to pass the URL around. The option I mentioned in bug 377010 comment 1 can be applied here.
Comment 9 Susan McCourt CLA 2012-05-22 13:55:03 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > Can we do something about this for 0.5?
> > I think that "Generate Link" in git status 2 looks pretty odd.
> > Could we instead make it "Compare" with tooltip "Open the compare page"?
> Yes, we can do this. Further, the compare page will contain the current diff
> block+change position where your status or commit page already located on.
> But we need a "tool" instead of "button" when rendering command. Not sure if we
> can render the mix of toll and button in the same command span. 

Why?  If it's a link it will just render as a link in either case.

Long run, we should probably just have API on the compare widget to move through diffs and someone on the outside can contribute the commands, decide how they are rendered, etc.
Comment 10 libing wang CLA 2012-05-22 14:59:31 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Can we do something about this for 0.5?
> > > I think that "Generate Link" in git status 2 looks pretty odd.
> > > Could we instead make it "Compare" with tooltip "Open the compare page"?
> > Yes, we can do this. Further, the compare page will contain the current diff
> > block+change position where your status or commit page already located on.
> > But we need a "tool" instead of "button" when rendering command. Not sure if we
> > can render the mix of toll and button in the same command span. 
> 
> Why?  If it's a link it will just render as a link in either case.
OK, I think I misunderstood the meaning of "button". I will just use "button" for all the compare commands. 

Target as M2 as the fix will be useful.
Comment 11 libing wang CLA 2012-05-22 17:18:27 EDT
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=561d3109475db48edff23b3ec1f2f49ce10f880f.

But the compare link href is static, as Susan mentioned to me in the ST conversation.
*****
updating it might be a challenge though
we are used to the links being static
so there may be some work to do there since you want the link to change whenever the diff changes
Comment 12 libing wang CLA 2012-05-22 17:23:59 EDT
*** Bug 377010 has been marked as a duplicate of this bug. ***