Skip to content

Commit 6e52b5a

Browse files
committed
fix(devtools-extension): remove Html wildcard import, clean up renderArrow signature
1 parent c455c2d commit 6e52b5a

1 file changed

Lines changed: 26 additions & 26 deletions

File tree

packages/devtools-extension/src/panel/src/FlowView.elm

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module FlowView exposing (view, viewPlaybackControls)
22

3-
import Html exposing (..)
3+
import Html exposing (Html)
44
import Html.Attributes exposing (..)
55
import Html.Events exposing (onClick)
66
import JsonTree
@@ -91,9 +91,9 @@ viewRail events playbackIndex selectedNodeId =
9191
else
9292
count * nodeSpacing + 60
9393
in
94-
div [ Html.Attributes.class "fv-rail" ]
94+
Html.div [ Html.Attributes.class "fv-rail" ]
9595
[ if List.isEmpty sdkNodes then
96-
div [ Html.Attributes.class "fv-rail-empty" ] [ Html.text "No SDK nodes recorded yet." ]
96+
Html.div [ Html.Attributes.class "fv-rail-empty" ] [ Html.text "No SDK nodes recorded yet." ]
9797

9898
else
9999
Svg.svg
@@ -104,7 +104,7 @@ viewRail events playbackIndex selectedNodeId =
104104
]
105105
(railDefs
106106
:: List.concat (List.indexedMap (renderRailNode selectedNodeId) visibleNodes)
107-
++ List.concat (List.indexedMap (renderArrow (List.length visibleNodes)) visibleNodes)
107+
++ List.concat (List.indexedMap (\i _ -> renderArrow (List.length visibleNodes) i) visibleNodes)
108108
)
109109
]
110110

@@ -220,8 +220,8 @@ renderRailNode selectedNodeId index event =
220220
]
221221

222222

223-
renderArrow : Int -> Int -> AuthEvent -> List (Svg Msg)
224-
renderArrow total index _ =
223+
renderArrow : Int -> Int -> List (Svg Msg)
224+
renderArrow total index =
225225
if index >= total - 1 then
226226
[]
227227

@@ -265,7 +265,7 @@ viewDetail : List AuthEvent -> Maybe String -> Set String -> Html Msg
265265
viewDetail events selectedNodeId expandedSubRows =
266266
case selectedNodeId of
267267
Nothing ->
268-
div [ Html.Attributes.class "fv-detail fv-detail-empty" ]
268+
Html.div [ Html.Attributes.class "fv-detail fv-detail-empty" ]
269269
[ Html.text "Select a node to see its details." ]
270270

271271
Just nodeId ->
@@ -274,9 +274,9 @@ viewDetail events selectedNodeId expandedSubRows =
274274
List.filter (\e -> e.causedBy == Just nodeId) events
275275
|> List.sortBy .timestamp
276276
in
277-
div [ Html.Attributes.class "fv-detail" ]
277+
Html.div [ Html.Attributes.class "fv-detail" ]
278278
(if List.isEmpty netEvents then
279-
[ div [ Html.Attributes.class "fv-no-data" ]
279+
[ Html.div [ Html.Attributes.class "fv-no-data" ]
280280
[ Html.text "No network requests attributed to this node." ]
281281
]
282282

@@ -325,17 +325,17 @@ viewNetGroup event expandedSubRows =
325325
requestKey =
326326
event.id ++ ":request"
327327
in
328-
div [ Html.Attributes.class "fv-net-group" ]
329-
[ div [ Html.Attributes.class "fv-net-group-header" ]
330-
[ span [ Html.Attributes.class ("tl-meth " ++ methodClass event.method) ]
328+
Html.div [ Html.Attributes.class "fv-net-group" ]
329+
[ Html.div [ Html.Attributes.class "fv-net-group-header" ]
330+
[ Html.span [ Html.Attributes.class ("tl-meth " ++ methodClass event.method) ]
331331
[ Html.text (Maybe.withDefault "" event.method) ]
332-
, span [ Html.Attributes.class "fv-net-url" ] [ Html.text urlText ]
333-
, span [ Html.Attributes.class ("fv-net-status " ++ statusClass event.status) ]
332+
, Html.span [ Html.Attributes.class "fv-net-url" ] [ Html.text urlText ]
333+
, Html.span [ Html.Attributes.class ("fv-net-status " ++ statusClass event.status) ]
334334
[ Html.text statusText ]
335-
, span [ Html.Attributes.class "fv-net-dur" ] [ Html.text durationText ]
335+
, Html.span [ Html.Attributes.class "fv-net-dur" ] [ Html.text durationText ]
336336
]
337337
, if not hasAny then
338-
div [ Html.Attributes.class "fv-no-data" ] [ Html.text "No data captured for this request." ]
338+
Html.div [ Html.Attributes.class "fv-no-data" ] [ Html.text "No data captured for this request." ]
339339

340340
else
341341
Html.text ""
@@ -355,7 +355,7 @@ viewNetGroup event expandedSubRows =
355355
Just cs ->
356356
List.indexedMap
357357
(\i c ->
358-
div [ Html.Attributes.class "coll-card" ]
358+
Html.div [ Html.Attributes.class "coll-card" ]
359359
[ JsonTree.view ("Collector " ++ String.fromInt (i + 1)) c ]
360360
)
361361
cs
@@ -384,14 +384,14 @@ viewSection key label expandedSubRows content =
384384
icon =
385385
if isOpen then "" else ""
386386
in
387-
div []
388-
[ div
387+
Html.div []
388+
[ Html.div
389389
[ Html.Attributes.class "fv-section-row"
390390
, Html.Events.onClick (ToggleSubRow key)
391391
]
392392
[ Html.text (icon ++ label) ]
393393
, if isOpen then
394-
div [ Html.Attributes.class "fv-section-body" ] content
394+
Html.div [ Html.Attributes.class "fv-section-body" ] content
395395

396396
else
397397
Html.text ""
@@ -403,7 +403,7 @@ viewSection key label expandedSubRows content =
403403

404404
view : List AuthEvent -> Maybe Int -> Maybe String -> Set String -> Html Msg
405405
view events playbackIndex selectedNodeId expandedSubRows =
406-
div [ Html.Attributes.class "fv-view" ]
406+
Html.div [ Html.Attributes.class "fv-view" ]
407407
[ viewRail events playbackIndex selectedNodeId
408408
, viewDetail events selectedNodeId expandedSubRows
409409
]
@@ -426,13 +426,13 @@ viewPlaybackControls events playbackIndex isPlaying =
426426
Just n -> "Step " ++ String.fromInt (n + 1) ++ " / " ++ String.fromInt total
427427
Nothing -> ""
428428
in
429-
div [ Html.Attributes.class "fv-playback-controls" ]
430-
[ button [ Html.Events.onClick ResetPlayback, Html.Attributes.class "tb-btn" ] [ Html.text "◀◀" ]
429+
Html.div [ Html.Attributes.class "fv-playback-controls" ]
430+
[ Html.button [ Html.Events.onClick ResetPlayback, Html.Attributes.class "tb-btn" ] [ Html.text "◀◀" ]
431431
, if isPlaying then
432-
button [ Html.Events.onClick StopPlayback, Html.Attributes.class "tb-btn" ] [ Html.text "⏸ Pause" ]
432+
Html.button [ Html.Events.onClick StopPlayback, Html.Attributes.class "tb-btn" ] [ Html.text "⏸ Pause" ]
433433

434434
else
435-
button
435+
Html.button
436436
[ Html.Events.onClick StartPlayback
437437
, Html.Attributes.class "tb-btn"
438438
, Html.Attributes.disabled (List.isEmpty sdkNodes)
@@ -441,7 +441,7 @@ viewPlaybackControls events playbackIndex isPlaying =
441441
(if playbackIndex == Nothing then "▶ Play" else "▶ Resume")
442442
]
443443
, if stepLabel /= "" then
444-
span [ Html.Attributes.class "fv-step-label" ] [ Html.text stepLabel ]
444+
Html.span [ Html.Attributes.class "fv-step-label" ] [ Html.text stepLabel ]
445445

446446
else
447447
Html.text ""

0 commit comments

Comments
 (0)