Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reversed stage steps via sort #783

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/elm/Pages/Org_/Repo_/Build_.elm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module Pages.Org_.Repo_.Build_ exposing (..)

import Auth
import Browser.Dom exposing (focus)
import Components.Build
import Components.Loading
import Components.Logs
import Components.Svgs
Expand Down Expand Up @@ -272,7 +271,7 @@ update shared route msg model =
GetBuildStepsResponse options response ->
case response of
Ok ( _, steps ) ->
( { model | steps = RemoteData.succeed steps }
( { model | steps = RemoteData.succeed <| List.sortBy .number steps }
, steps
|> List.Extra.find (\step -> Maybe.withDefault -1 model.focus.group == step.number)
|> Maybe.map
Expand All @@ -298,7 +297,7 @@ update shared route msg model =
GetBuildStepsRefreshResponse response ->
case response of
Ok ( _, steps ) ->
( { model | steps = RemoteData.succeed steps }
( { model | steps = RemoteData.succeed <| List.sortBy .number steps }
, steps
|> List.filter (\step -> List.member step.number model.viewing)
|> List.map
Expand Down Expand Up @@ -587,9 +586,7 @@ view shared route model =
viewStages shared model route steps

else
List.map (viewStep shared model route) <|
List.sortBy .number <|
RemoteData.withDefault [] model.steps
List.map (viewStep shared model route) steps
]
]

Expand Down
Loading