Closed helfi92 closed 8 years ago
@eliperelman, I totally agree with you. Keeping the components functional is the way to go. I can implement a jumpToLine
function in LogViewer that can take a lineNumber
and scroll the window by an x amount of pixels and then let LazyList take control. I am aware there is currently no UI that can take a lineNumber
. Do we need one or is that not important for now.
I can also implement a jumpToHighlight
function which will run if and only if there is a highlightStart
number in the URL. I think that's a great feature to have. Thoughts?
@eliperelman latest commit addresses your comments. Looks a lot cleaner :)
Ok, this should do what you suggested. Requesting a review.
@eliperelman weird, but for this specific log, the line after 1446 turns into 1001.
Works on the huge log though: http://localhost:4000/?url=https%3A%2F%2Fqueue.taskcluster.net%2Fv1%2Ftask%2FB8yyH1HORxKkQ9p1Sh0CFA%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive_backing.log&highlightStart=&highlightEnd=&lineNumber=300000
Thoughts?
@helfi92 I'm not sure. You may want to try adding some console.log
s to the code to see if you can debug what the expected coordinates, percentages, and window calculations are.
Looks like the line differences are because of some HTML non-escaping in the log. Will fix that in a follow up.
To experiment with this feature, select a line number in the log and then refresh the page. the log will take you to the selected line.