Till now, log viewer was rendered in handlebars, which was the simplest
solution, but it had a major drawback - every append to log caused it to
rerender which was not efficient and memory consuming.
The new approach is to make Travis.Log interpret the log and send lines
with instructions to the view, so for example if view should add a line,
it gets something like:
{ number: 1, content: '$ bundle install' }
Such approach is required to handle cases where data coming from pusher
is not actually a new line. For example output containing dots from
tests needs to be appended:
$ rake
....
Such output could be sent to client in 2 chunks: "$ rake\n.." and "..".
In such situation we would need to send 3 instructions:
{ number: 1, content: '$ rake' }
{ number: 2, content: '..' }
{ number: 2, content: '..', append: true }
The third instruction can come much later, because tests can take a
while to run, so we can't assume that each line will come in one piece.
The other scenario is \r, for example when showing progress:
\rDownloading: 10%
\rDownloading: 50%
\rDownloading: 100%
Such input should be changed into such instructions:
{ number: 1, content: 'Downloading: 10%' }
{ number: 1, content: 'Downloading: 50%', replace: true }
{ number: 1, content: 'Downloading: 100%', replace: true }
Travis.Log also supports folds, for example on bundle install, the code
was rewritten to make folds management simpler.
When scrolling page with long log page was freezing for a moment on
every DOM update (which means at least for a second as we update
duration every second). This was caused by unnecassery reflows - the
main offender was display: box (flexible layout model). It turns out
that newer version of flexible layout, display: flex, behaves much
better. It works on newest versions of Chrome, Safari and on next
version of Opera. Unfortunately Firefox will support it in 18th version,
so I left rules with -moz prefixes for old flexible page model
I think it will be better to fix position of selected project indicator in left panel.
So when you toggle project info it doesn't jump around, and info separator doesn't detach right border.
Here is some screenshots.
Before: http://cl.ly/image/3v3L2w0K3S1K
After: http://cl.ly/image/200o3i1l1b3b
If we keep it only on states lower than root and afterSignIn is sent
when app is still in root.loading (which is often the case as we need to
wait for repository deserialization), it will try to find afterSignIn on
root.