Edgewall Software
Modify

Opened 20 years ago

Closed 18 years ago

Last modified 16 years ago

#48 closed enhancement (fixed)

Improve the display of multi line commit messages in the Timeline

Reported by: Jonas Borgström Owned by: Christian Boos
Priority: normal Milestone: 0.9
Component: timeline Version: devel
Severity: minor Keywords: review
Cc: Branch:
Release Notes:
API Changes:
Internal 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 (0)

Change History (18)

comment:1 by daniel, 20 years ago

Resolution: fixed
Status: newclosed

This has been improved in the new templates.

comment:2 by daniel, 20 years ago

That would be in changeset [103]

comment:3 by daniel, 20 years ago

Resolution: fixed
Status: closedreopened

Falsehood, lies and untruth i say! :-)

comment:4 by daniel, 20 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in [121]

comment:5 by Christian Boos, 19 years ago

Resolution: fixed
Status: closedreopened

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 by Christian Boos, 19 years ago

Owner: changed from Jonas Borgström to Christian Boos
Priority: highnormal
Status: reopenednew

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 by Christian Boos, 19 years ago

Status: newassigned
Summary: Better support for multi line commit messages.Improve the display of multi line commit messages in the Timeline

comment:8 by Christopher Lenz, 19 years ago

Please not another option for the timeline at this point!

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

comment:9 by Christian Boos, 19 years ago

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 by Christian Boos, 19 years ago

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 by Christian Boos, 18 years ago

Milestone: 0.9.1
Severity: normalminor
Version: 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 by Christian Boos, 18 years ago

Keywords: review added

comment:13 by Christopher Lenz, 18 years ago

Milestone: 0.9.10.9.2

comment:14 by Christopher Lenz, 18 years ago

Milestone: 0.9.30.9.4

comment:15 by Christopher Lenz, 18 years ago

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 by Alec Thomas <alec@…>, 18 years ago

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 by Alec Thomas <alec@…>, 18 years ago

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

comment:18 by Christian Boos, 18 years ago

Milestone: 0.9.40.9
Resolution: fixed
Status: assignedclosed

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.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
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.