#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 , 21 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 by , 21 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Falsehood, lies and untruth i say! :-)
comment:5 by , 20 years ago
Resolution: | fixed |
---|---|
Status: | closed → 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 by , 20 years ago
Owner: | changed from | to
---|---|
Priority: | high → normal |
Status: | reopened → 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 by , 20 years ago
Status: | new → assigned |
---|---|
Summary: | Better support for multi line commit messages. → Improve the display of multi line commit messages in the Timeline |
comment:8 by , 20 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 , 20 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 , 19 years ago
I would propose to close this ticket soon:
- either as wontfix, consider the timeline to be a teaser for the full changeset information, available by clicking
- 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 , 19 years ago
Milestone: | → 0.9.1 |
---|---|
Severity: | normal → minor |
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 124 124 util.escape(util.shorten_line(message))) 125 125 href = self.env.abs_href.changeset(chgset.rev) 126 126 message = wiki_to_html(message, self.env, db, 127 absurls=True) 127 absurls=True, 128 escape_newlines=True) 128 129 else: 129 130 title = 'Changeset <em>[%s]</em> by %s' \ 130 131 % (util.escape(chgset.rev), 131 132 util.escape(chgset.author)) 132 133 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') 135 143 if show_files: 136 144 files = [] 137 145 for chg in chgset.get_changes():
comment:12 by , 19 years ago
Keywords: | review added |
---|
comment:13 by , 19 years ago
Milestone: | 0.9.1 → 0.9.2 |
---|
comment:14 by , 19 years ago
Milestone: | 0.9.3 → 0.9.4 |
---|
comment:15 by , 19 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 , 19 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 , 19 years ago
Actually now it does put the state in the session, but it still special-cases :\
comment:18 by , 19 years ago
Milestone: | 0.9.4 → 0.9 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
This has been improved in the new templates.