Skip to content

Commit

Permalink
refactor: refined line focusing
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Jan 26, 2024
1 parent 19de625 commit 360e9ba
Show file tree
Hide file tree
Showing 6 changed files with 468 additions and 253 deletions.
4 changes: 2 additions & 2 deletions src/elm/Components/Logs.elm
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ viewLine shared props logLine lineNumber =
[ div
[ class "wrapper"
, Util.testAttribute <| String.join "-" [ "log", "line", props.resourceType, props.resourceNumber, String.fromInt lineNumber ]
, class <| Focus.lineRangeStyles props.focus lineNumber
, class <| Focus.lineRangeStyles (String.toInt props.resourceNumber) lineNumber props.focus
]
[ td []
[ button
[ Util.onClickPreventDefault <|
props.msgs.pushUrlHash
{ hash =
Focus.toString <| Focus.updateLineRange shared props.focus lineNumber
Focus.toString <| Focus.updateLineRange shared (String.toInt props.resourceNumber) lineNumber props.focus
}
, Util.testAttribute <| String.join "-" [ "log", "line", "num", props.resourceType, props.resourceNumber, String.fromInt lineNumber ]
, Focus.toAttr
Expand Down
Loading

0 comments on commit 360e9ba

Please sign in to comment.