Skip to content

Commit 7e42612

Browse files
author
neurodynamic
committed
removes unused code; adds changeDescription width maximum
1 parent d0548f3 commit 7e42612

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

elm/Stages/Finished/View.elm

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ renderChange brokenFile index { lineNumber, changeDescription } =
9494
, Background.color Colors.purple
9595
, Border.rounded 5
9696
, paddingXY 20 8
97-
, width fill
97+
, width (maximum 740 fill)
9898
]
9999
((changeDescription
100100
|> Utils.String.formatBackticks
@@ -131,31 +131,16 @@ labeledCodeSnippet { label, focusedLine, content } =
131131
let
132132
codeLines =
133133
getNearbyLines focusedLine content
134-
135-
longestLineLength =
136-
codeLines
137-
|> List.map (Tuple.second >> String.length)
138-
|> List.maximum
139-
|> Maybe.withDefault 0
140-
141-
needsAScrollbar =
142-
longestLineLength > 55
143134
in
144-
column [ spacing 10 ]
135+
column [ spacing 10, centerX ]
145136
[ paragraph [ Font.center ] [ text label ]
146137
, column
147-
([ Background.color Colors.veryLightGray
148-
, Border.rounded 5
149-
, width (px 700)
150-
, height (px 136)
151-
, scrollbarX
152-
]
153-
-- ++ (if needsAScrollbar then
154-
-- [ height (px 136) ]
155-
-- else
156-
-- [ height (px 127) ]
157-
-- )
158-
)
138+
[ Background.color Colors.veryLightGray
139+
, Border.rounded 5
140+
, width (px 700)
141+
, height (px 136)
142+
, scrollbarX
143+
]
159144
(List.map (renderCodeLine focusedLine) codeLines)
160145
]
161146

0 commit comments

Comments
 (0)