Edgewall Software
Modify

Opened 6 years ago

Last modified 2 years ago

#10532 assigned enhancement

Show word diff when summary changes (instead of <old value> to <new value>)

Reported by: framay <franz.mayer@…> Owned by: Christian Boos
Priority: normal Milestone: next-dev-1.3.x
Component: ticket system Version: 0.13dev
Severity: minor Keywords: changelog diff
Cc:
Release Notes:
API Changes:

Description

In this summary change you do not see any changes at once - and I guess there is not a change at all (which might be a defect).

It would be better readable if summary changes would be displayed in a diff view instead of "<old value> to <new value>" manner, since most summary changes are typos or small changes.

If it is a bigger change (maybe using some smart algorithm to determine that it has changed more than 50%) Trac could display it in this way: <old value> to <new value>.

Attachments (4)

T10532_underline_property_diff.patch (1.9 KB ) - added by Peter Suter 3 years ago.
Underlined.png (14.1 KB ) - added by Ryan J Ollos 3 years ago.
Shadowed.png (13.2 KB ) - added by Ryan J Ollos 3 years ago.
propchanges-highlighting.png (15.8 KB ) - added by Jun Omae 3 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 6 years ago by framay <franz.mayer@…>

Well I guess it depends on ticket #6858, right?

comment:2 Changed 6 years ago by Christian Boos

Milestone: unscheduled
Severity: normalminor

What, you didn't see s/buttom/bottom/ at once? ;-)

I'm not sure whether that would look good or not… some experimentation would be in order.

And yes, #6858 would perhaps help to make the diff highlighting more pertinent, but the current way is already fine in most cases, like in this specific case:

  • (a) a vs. (b) b

    a b  
    1 [PATCH] Prev, Query, Next links at buttom of ticket page
     1[PATCH] Prev, Query, Next links at bottom of ticket page
Last edited 6 years ago by Christian Boos (previous) (diff)

comment:3 Changed 6 years ago by Peter Suter

A full colored diff would would maybe be a bit distracting. How about something more subtle like underlining the additions / deletions:

  • Summary changed from [PATCH] Prev, Query, Next links at buttom of ticket page to [PATCH] Prev, Query, Next links at bottom of ticket page

Maybe just add some linebreaks:

  • Summary changed from
    [PATCH] Prev, Query, Next links at buttom of ticket page to
    [PATCH] Prev, Query, Next links at bottom of ticket page

Changed 3 years ago by Peter Suter

comment:4 Changed 3 years ago by Peter Suter

The attached patch attempts to implement the underlining. I'm not quite sure what the best criteria are to trigger this mode. We probably shouldn't underline very big or obvious short changes. Also it's unclear how the reporter and owner fields (and other custom text fields) should be handled.

Tests may need to be updated when this is decided.

Last edited 3 years ago by Peter Suter (previous) (diff)

Changed 3 years ago by Ryan J Ollos

Attachment: Underlined.png added

Changed 3 years ago by Ryan J Ollos

Attachment: Shadowed.png added

comment:5 Changed 3 years ago by Ryan J Ollos

Seems like a good change if the algorithm is tuned a bit, and looks pretty good on top of #11835. I tried using a background color rather than underline since it won't hide characters such as the underscore. It's probably too distracting.

I like always using the → between old and new rather than "changed from old to new".

comment:6 Changed 3 years ago by Peter Suter

Agreed, #11835 should definitively be taken into account here with the →. I had not considered the underlined underscore problem. Subjectively I still prefer underlining.

Changed 3 years ago by Jun Omae

comment:7 Changed 3 years ago by Jun Omae

I would like to use highlight rather than underline. I don't think underline decorating is readable.

If you want to use arrow character (), it would be good to use %(old)s → %(new)s, simply.

jomae.git@t10532.

comment:8 Changed 3 years ago by Peter Suter

OK, that does look quite nice. What do you think about only showing these on :hover?

comment:9 in reply to:  8 Changed 3 years ago by Ryan J Ollos

Replying to psuter:

What do you think about only showing these on :hover?

That sounds good to me, so that it won't be too distracting.

comment:10 Changed 2 years ago by Christian Boos

Keywords: changelog diff added
Milestone: unschedulednext-dev-1.3.x
Owner: set to Christian Boos
Status: newassigned
Summary: Show diff when summary changes (instead of <old value> to <new value>)Show word diff when summary changes (instead of <old value> to <new value>)

Looks nice, but I'd like to take it one step further:

Résumé : #10533 (before)#10532 (after)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as assigned The owner will remain Christian Boos.
The ticket will be disowned.
as The resolution will be set.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


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