@@ -477,23 +477,43 @@ viewChangedDefinitionCard projectRef toggledChangeLines branchDiff maxBadgeLengt
477477 case ChangeLine . source changeLine of
478478 Just source ->
479479 let
480- linked =
481- let
482- branchRef =
483- case changeLine of
484- ChangeLine . Removed _ _ ->
485- branchDiff. oldBranch. ref
480+ ( branchRef, gutterIndicator ) =
481+ case changeLine of
482+ ChangeLine . Removed _ _ ->
483+ ( branchDiff. oldBranch. ref, " -" )
486484
487- _ ->
488- branchDiff. newBranch. ref
489- in
485+ ChangeLine . Added _ _ ->
486+ ( branchDiff. newBranch. ref, " +" )
487+
488+ _ ->
489+ ( branchDiff. newBranch. ref, " " )
490+
491+ linked =
490492 SyntaxConfig . empty
491493 |> SyntaxConfig . withToClick
492494 ( Link . projectBranchDefinition projectRef branchRef)
493495
496+ gutter =
497+ let
498+ lns =
499+ List . range 1 ( Syntax . numLines source)
500+
501+ viewLn ln =
502+ div [ class " gutter" ]
503+ [ span [ class " line-number" ] [ ln |> String . fromInt |> text ]
504+ , text " "
505+ , span [ class " change-indicator" ] [ text gutterIndicator ]
506+ , text " "
507+ ]
508+ in
509+ div [ class " gutter-lines" ] ( List . map viewLn lns)
510+
494511 expandedContent =
495- pre [ class " definition-syntax monochrome" ]
496- [ code [] [ Syntax . view linked source ] ]
512+ div [ class " definition-source" , class ( String . toLower ( ChangeLine . toString changeLine)) ]
513+ [ gutter
514+ , pre [ class " definition-syntax monochrome" ]
515+ [ code [] [ Syntax . view linked source ] ]
516+ ]
497517 in
498518 ( Just expandedContent
499519 , Icon . collapseUp
0 commit comments