v0.9 Release – Contemplating the Implementation for the Line Break bug

As one of my goals for this release I wanted to take on a new bug. Now, the problem is that if there are line breaks in the commit message the pushlog will just turn them into spaces. Thus the message will become one big clump of text, which doesn’t look good.

The goal is to only show the very first line of the commit message if it has any line breaks in it. Then have an ellipsis link at the end that the user can click to expand/collapse the rest of the message. Also, when the message is expanded the line breaks should be displayed properly. For example:

Current Implementation

I am trying to fix a new bug 1) I will use jquery 2) I will finish it soon 3) 2 + 2 is 4

New Implementation while collapsed

I am trying to fix a new bug [...]

New Implementation while expanded

I am trying to fix a new bug [...]
1) I will use jquery
2) I will finish it soon
3) 2 + 2 is 4 or is it 22?

I will probably keep all the new code on the client side, implemented using jquery. Right now the line breaks are turned into spaces because they use the ‘n’ character instead of using ‘<br/>’. I want to change all the line breaks to ‘<br />’ and then add an ellipsis link to all the commit messages that need it.

I’ve added expand/collapse functionality to the pushlog before so this shouldn’t be very hard to do. Look out for my next blog post explaining my implementation.

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">