1- module Effect.LocalDev exposing (DevBar , InitConfig , Model , Msg , SubscriptionsConfig , UpdateConfig , ViewConfig , fileReadWriteErrorView , hideFreezeAndResetButtons , init , initDevBar , isFullyInitialized , maybeTestEditorView , onConnection , onDisconnection , receivedToFrontend , recordingButton , recordingPill , resetDebugStoreBE , subscriptions , update )
1+ module Effect.LocalDev exposing (DevBar , InitConfig , Model , Msg , SubscriptionsConfig , UpdateConfig , ViewConfig , fileReadWriteErrorView , hideFreezeAndResetButtons , init , initDevBar , isFullyInitialized , maybeTestEditorView , onConnection , onDisconnection , receivedToFrontend , recordingButton , recordingPill , resetDebugStoreBE , subscriptions , update , ConnectionMsg , Event , EventType , RecordingState , WireMsg )
22
33{- | Ignore this module, for internal use only.
44
5- @docs DevBar, InitConfig, Model, Msg, SubscriptionsConfig, UpdateConfig, ViewConfig, fileReadWriteErrorView, hideFreezeAndResetButtons, init, initDevBar, isFullyInitialized, maybeTestEditorView, onConnection, onDisconnection, receivedToFrontend, recordingButton, recordingPill, resetDebugStoreBE, subscriptions, update
5+ @docs DevBar, InitConfig, Model, Msg, SubscriptionsConfig, UpdateConfig, ViewConfig, fileReadWriteErrorView, hideFreezeAndResetButtons, init, initDevBar, isFullyInitialized, maybeTestEditorView, onConnection, onDisconnection, receivedToFrontend, recordingButton, recordingPill, resetDebugStoreBE, subscriptions, update, ConnectionMsg, Event, EventType, RecordingState, WireMsg
66
77-}
88
@@ -173,7 +173,7 @@ normalInit config =
173173 case config. devBar. isRecordingEvents of
174174 Just recording ->
175175 if recording. recordingStopped then
176- loadTestsFile GotTestFile |> Cmd . map ( config . mapMsg << TestEditorMsg )
176+ loadTestsFile GotTestFile |> Cmd . map ( \ a -> TestEditorMsg a |> config . mapMsg )
177177
178178 else
179179 recordingInitCmds config
@@ -192,7 +192,7 @@ recordingInitCmds config =
192192 Cmd . batch
193193 [ config. startRecording ()
194194 , Task . map2 Tuple . pair Time . now Browser . Dom . getViewport
195- |> Task . perform ( config . mapMsg << GotTimeAndViewport )
195+ |> Task . perform ( \ a -> GotTimeAndViewport a |> config . mapMsg )
196196 ]
197197
198198
@@ -673,7 +673,7 @@ normalUpdate config msg m localDevModel =
673673 config. devBar
674674 )
675675 |> config. debugSaveDevBar
676- , Cmd . map ( config . mapMsg << TestEditorMsg ) cmd
676+ , Cmd . map ( \ a -> TestEditorMsg a |> config . mapMsg ) cmd
677677 )
678678
679679 Nothing ->
@@ -768,7 +768,7 @@ normalSubscriptions config =
768768 case config. devBar. isRecordingEvents of
769769 Just recording ->
770770 Sub . batch
771- [ config. gotEvent ( config . mapMsg << GotEvent )
771+ [ config. gotEvent ( \ a -> GotEvent a |> config . mapMsg )
772772 , if recording. recordingStopped then
773773 Browser . Events . onMouseUp ( Json . Decode . succeed ( config. mapMsg ( TestEditorMsg MouseUpEvent )))
774774
@@ -1972,14 +1972,17 @@ type alias HttpEvent =
19721972 }
19731973
19741974
1975+ sansSerifFont : Html .Attribute msg
19751976sansSerifFont =
19761977 Html . Attributes . style " font-family" " sans-serif"
19771978
19781979
1980+ backgroundColor : { a | charcoal : String } -> Html .Attribute msg
19791981backgroundColor config =
19801982 Html . Attributes . style " background-color" config. charcoal
19811983
19821984
1985+ fontColor : { a | white : String } -> Html .Attribute msg
19831986fontColor config =
19841987 Html . Attributes . style " color" config. white
19851988
@@ -2241,7 +2244,7 @@ eventsView config events =
22412244 ++ fromJsPortEvent. data
22422245 |> Just
22432246
2244- HttpLocal { filepath } ->
2247+ HttpLocal _ ->
22452248 Nothing
22462249
22472250 WindowResize { width, height } ->
@@ -2411,6 +2414,7 @@ type EventType2
24112414 | Wheel2 ClientId MillisecondWaitBefore WheelEvent
24122415
24132416
2417+ eventsToEvent2Helper : { a | previousEvent : Maybe EventType2 , rest : List EventType2 } -> List EventType2
24142418eventsToEvent2Helper state =
24152419 maybeToList state. previousEvent
24162420 ++ state. rest
@@ -2919,8 +2923,8 @@ findIndexHelp index predicate list =
29192923 findIndexHelp ( index + 1 ) predicate xs
29202924
29212925
2922- eventToString : Int -> Settings -> List ClientId -> List EventType2 -> List Expression
2923- eventToString depth settings clients events =
2926+ eventToString : Settings -> List ClientId -> List EventType2 -> List Expression
2927+ eventToString settings clients events =
29242928 List . map
29252929 ( \ event ->
29262930 let
@@ -2949,7 +2953,7 @@ eventToString depth settings clients events =
29492953 , Codegen . lambda
29502954 [ Codegen . varPattern ( client clientId) ]
29512955 ( Codegen . list
2952- ( eventToString ( depth + 1 ) settings clients events2)
2956+ ( eventToString settings clients events2)
29532957 )
29542958 ]
29552959
@@ -3239,11 +3243,6 @@ testCode testName settings events overriddenHttpRequests =
32393243 clients =
32403244 List . map . clientId events |> listUnique
32413245
3242- events2 : List Expression
3243- events2 =
3244- eventsToEvent2 { previousEvent = Nothing , previousTime = firstTime, rest = [] } events
3245- |> eventToString 0 settings clients
3246-
32473246 singleFileEvents : List UploadedFile
32483247 singleFileEvents =
32493248 List . filterMap
@@ -3302,7 +3301,9 @@ testCode testName settings events overriddenHttpRequests =
33023301
33033302 updatedFields ->
33043303 Codegen . update " config" updatedFields
3305- , Codegen . list events2
3304+ , eventsToEvent2 { previousEvent = Nothing , previousTime = firstTime, rest = [] } events
3305+ |> eventToString settings clients
3306+ |> Codegen . list
33063307 ]
33073308 , needsFileUploadHelper = List . isEmpty singleFileEvents |> not
33083309 , needsMultipleFileUploadHelper = List . isEmpty multiFileEvents |> not
0 commit comments