Edgewall Software
Modify

Opened 8 years ago

Last modified 5 years ago

#12679 new enhancement

Add "View blame prior to this change" link to blame view

Reported by: anonymous Owned by:
Priority: normal Milestone: next-major-releases
Component: version control/browser Version:
Severity: normal Keywords: blame annotate
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Blame view (example) seems to be missing this very useful feature available on github (example).

On github each blame annotation line has a small icon with tooltip "View blame prior to this change" that links to the same blame page but at an older revision. This is allows quickly navigating through the history of the file.

Attachments (3)

BlamePrevious.png (52.3 KB ) - added by anonymous 8 years ago.
Mockup of "Blame Previous" button
Screen Shot 2017-02-07 at 14.03.40.png (120.5 KB ) - added by Ryan J Ollos 8 years ago.
2017-02-07.png (69.5 KB ) - added by Christian Boos 8 years ago.
focus on the …

Download all attachments as: .zip

Change History (11)

comment:1 by Christian Boos, 8 years ago

Milestone: next-dev-1.3.x
Owner: set to Christian Boos
Status: newassigned

It's there but it's kind of a "hidden feature".

If you click on a revision in the left column, the corresponding changeset shows up. There, any revision link will lead you to the blame view restarting at that revision, including the barely visible "…" link between each chunk.

Suggestions about how to make this better welcome.

Last edited 8 years ago by Christian Boos (previous) (diff)

in reply to:  1 ; comment:2 by anonymous, 8 years ago

If you click on a revision in the left column, the corresponding changeset shows up.

Yes, I was already aware of this, but did not find this feature there. (And I looked many times there before.)

There, any revision link will lead you to the blame view restarting at that revision,

Huh? I only see one revision link: the big title ("Changeset 9492") and it does not do that. That revision would not be useful anyway, but the one before.

including the barely visible "…" link between each chunk.

Huh? Oh. Even when knowing to look for "…" I didn't see that forever. Hidden feature indeed. Thanks.

Suggestions about how to make this better welcome.

How about a big button next to the "close" button, that says "Blame previous"?

by anonymous, 8 years ago

Attachment: BlamePrevious.png added

Mockup of "Blame Previous" button

by Ryan J Ollos, 8 years ago

in reply to:  2 comment:3 by Ryan J Ollos, 8 years ago

Replying to anonymous:

Huh? I only see one revision link: the big title ("Changeset 9492") and it does not do that. That revision would not be useful anyway, but the one before.

including the barely visible "…" link between each chunk.

Huh? Oh. Even when knowing to look for "…" I didn't see that forever. Hidden feature indeed. Thanks.

I'm still not seeing the "…". Any further hints?

Suggestions about how to make this better welcome.

How about a big button next to the "close" button, that says "Blame previous"?

That looks reasonable.

by Christian Boos, 8 years ago

Attachment: 2017-02-07.png added

focus on the …

comment:4 by Christian Boos, 8 years ago

focus on the ...

Between the hunks…

I still think it's useful there as it leads back to these lines in the next (well, previous) annotate view, but it should be given more visibility, like a (Blame) button instead of the nearly invisible "…" link.

The (Blame previous) button near the close is a good idea as well.

Last edited 8 years ago by Ryan J Ollos (previous) (diff)

comment:5 by anonymous, 8 years ago

  • trac/htdocs/js/blame.js

    diff -r 8cea232f7455 -r 12cd73d2d2a6 trac/htdocs/js/blame.js
    a b  
    7979            // remove former message panel if any
    8080            if (message)
    8181              message.remove();
     82
     83            var previous_link = $(data).find('.trac-diff a').first();
     84            var previous_button = $('<input value="' + _("Blame Previous") + '" type="button">');
     85            if (previous_link.length) {
     86                function previous() {
     87                  /* Go to previous changeset */
     88                  window.location.href = previous_link.attr('href');
     89                }
     90                previous_button.click(previous);
     91            } else {
     92                previous_button.attr("disabled","disabled");
     93            }
    8294            // create new message panel
    8395            if (!data)
    8496              data = "<strong>" + _("(no changeset information)") + "</strong>";
    8597            message = $('<div class="message">').css("position", "absolute")
    8698                .append($('<div class="inlinebuttons">')
     99                  .append(previous_button)
    87100                  .append($('<input value="' + _("Close") + '" type="button">').click(hide)))
    88101                .append($('<div class="embedded">').html(data))
    89102              .appendTo("body");

I'm out of ideas for how to fix the #L fragment to link to the clicked line number.

comment:6 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.3.xnext-dev-1.5.x

Milestone renamed

comment:7 by Ryan J Ollos, 5 years ago

Milestone: next-dev-1.5.xnext-major-releases

comment:8 by Ryan J Ollos, 5 years ago

Owner: Christian Boos removed
Status: assignednew

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.