Edgewall Software
Modify

Ticket #48 (closed enhancement: fixed)

Opened 8 years ago

Last modified 4 years ago

Improve the display of multi line commit messages in the Timeline

Reported by: jonas Owned by: cboos
Priority: normal Milestone: 0.9
Component: timeline Version: devel
Severity: minor Keywords: review
Cc:
Release Notes:
API Changes:

Description

The timeline will currently try to render the whole message
as one long wiki formatted line.

Only the first line should be visible in the timeline view by default. But it should also be possible to view the complete message.

Attachments

Change History

comment:1 Changed 8 years ago by daniel

  • Resolution set to fixed
  • Status changed from new to closed

This has been improved in the new templates.

comment:2 Changed 8 years ago by daniel

That would be in changeset [103]

comment:3 Changed 8 years ago by daniel

  • Resolution fixed deleted
  • Status changed from closed to reopened

Falsehood, lies and untruth i say! :-)

comment:4 Changed 8 years ago by daniel

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in [121]

comment:5 Changed 7 years ago by cboos

  • Resolution fixed deleted
  • Status changed from closed to reopened

This is definitely not correctly done: see [1535].

The original content of the changeset message was:

Added a {{{comment}}} wiki processor.

This makes it easy to add comments into wiki pages
using an already familiar syntax:

 * multi-line comments:
{{{
{{{
#!comment
Those links are not working yet, find out why:
  svn://repos.edgewall.com/projects
}}}
}}}

 * inline comments:
{{{
This is important. [[comment(TODO: explain why this is important)]]
}}}

which renders here as:


Added a comment wiki processor.

This makes it easy to add comments into wiki pages
using an already familiar syntax:

  • multi-line comments:
    {{{
    #!comment
    Those links are not working yet, find out why:
      svn://repos.edgewall.com/projects
    }}}
    
  • inline comments:
    This is important. [[comment(TODO: explain why this is important)]]
    

The problem is that by adding [[BR]] macros
for every newline in the original comment, this can break
valid formatting, as shown above.

comment:6 Changed 7 years ago by cboos

  • Owner changed from jonas to cboos
  • Priority changed from high to normal
  • Status changed from reopened to new

The problem reported above, though related to the original
summary of the ticket (Better support for multi line commit messages.)
is not really related to what is written in the description of the ticket. It is instead related to the problem described in #1181.

So what I'll do:

  • write a follow-up to the above problem in #1181
  • change the summary of this ticket to better match its description
  • leave it open, as the current behavior of the Timeline is exactly as originally described:

The timeline will currently try to render the whole message as one long wiki formatted line.

Only the first line should be visible in the timeline view by default. But it should also be possible to view the complete message

I could implement it using a similar approach to what I did for the
Revision Log: add a Show full message check box in the preference
panel.

comment:7 Changed 7 years ago by cboos

  • Status changed from new to assigned
  • Summary changed from Better support for multi line commit messages. to Improve the display of multi line commit messages in the Timeline

comment:8 Changed 7 years ago by cmlenz

Please not another option for the timeline at this point!

Just use trac.util.shorten_line() on the log message.

comment:9 Changed 7 years ago by cboos

I did what you suggested in [1561].

But I keep this ticket open, since there's currently no support
for viewing the full message log in the timeline, as requested.

I also experimented to see what it would be with the full message log:
I think it's nice, you have at a glance the full information...

comment:10 Changed 7 years ago by cboos

I would propose to close this ticket soon:

  1. either as wontfix, consider the timeline to be a teaser for the full changeset information, available by clicking
  2. or by adding a TracIni [timeline] option, changeset_show_full_log (consistent with the existing changeset_show_files)

I'd prefer option 2.

comment:11 Changed 6 years ago by cboos

  • Milestone set to 0.9.1
  • Severity changed from normal to minor
  • Version set to devel

On top of r2409 + attachment:ticket:2232:oneliner_simplify_blocks.3.patch,
the following changes would allow for 3 display modes for changesets:

[timeline]
changeset_display = full|compact|short
full
the full changeset is shown, similar to what appears in the changeset view.
short
the truncated oneliner version is shown.
compact
the oneliner version of the full message is shown (this is more compact but also less readable than full)

The setting would default to short.

  • trac/versioncontrol/web_ui/changeset.py

    old new  
    124124                                   util.escape(util.shorten_line(message))) 
    125125                        href = self.env.abs_href.changeset(chgset.rev) 
    126126                        message = wiki_to_html(message, self.env, db, 
    127                                                absurls=True) 
     127                                               absurls=True, 
     128                                               escape_newlines=True) 
    128129                    else: 
    129130                        title = 'Changeset <em>[%s]</em> by %s' \ 
    130131                                % (util.escape(chgset.rev), 
    131132                                   util.escape(chgset.author)) 
    132133                        href = self.env.href.changeset(chgset.rev) 
    133                         message = wiki_to_oneliner(message, self.env, db, 
    134                                                    shorten=True) 
     134                        display = self.config.get('timeline', 
     135                                                  'changeset_display') 
     136                        if display == 'full': 
     137                            message = wiki_to_html(message, self.env, db, 
     138                                                   absurls=True, 
     139                                                   escape_newlines=True) 
     140                        else: 
     141                            message = wiki_to_oneliner(message, self.env, db, 
     142                                                       shorten=mode == 'short') 
    135143                    if show_files: 
    136144                        files = [] 
    137145                        for chg in chgset.get_changes(): 

comment:12 Changed 6 years ago by cboos

  • Keywords review added

comment:13 Changed 6 years ago by cmlenz

  • Milestone changed from 0.9.1 to 0.9.2

comment:14 Changed 6 years ago by cmlenz

  • Milestone changed from 0.9.3 to 0.9.4

comment:15 Changed 6 years ago by cmlenz

Actually, I would suggest we mark this ticket as closed.
Showing the complete commit message is a separate issue, and I don't think
it'd be a good idea to add options for such things to trac.ini. Maybe
there should be a option in the [timeline] option that would control
truncation of all the different kinds of messages. That is however a bit
hard to implement, as it would require adapting all the individual event
providers.

comment:16 Changed 6 years ago by Alec Thomas <alec@…>

I replace wiki_to_oneliner() with wiki_to_html() on TracHacks and find it a lot more useful than the truncated one line message. Personal preference though I guess.

This patch adds an optional checkbox under the changeset checkbox, which toggles full log messages.

It doesn't store the toggle in the session though, and it special-cases changesets in the timeline.cs though, so...

comment:17 Changed 6 years ago by Alec Thomas <alec@…>

Actually now it does put the state in the session, but it still special-cases :\

comment:18 Changed 6 years ago by cboos

  • Milestone changed from 0.9.4 to 0.9
  • Resolution set to fixed
  • Status changed from assigned to closed

I think we should consolidate the discussion
about having verbose timeline entries in #2360.

I'll mark this one as fixed, as [1561] did
most of the job concerning the initial problem.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.