Skip to content

Commit

Permalink
Merge pull request #1191 from ds-wizard/hotfix/4.8.2
Browse files Browse the repository at this point in the history
Hotfix 4.8.2
  • Loading branch information
janslifka authored Jul 24, 2024
2 parents d9484da + 476615e commit 701cabd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
30 changes: 14 additions & 16 deletions engine-wizard/elm/Wizard/Common/Components/Questionnaire.elm
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ type alias Model =

type alias TypeHints =
{ path : List String
, searchValue : String
, hints : ActionResult (List TypeHint)
}

Expand Down Expand Up @@ -533,7 +534,7 @@ type Msg
| HideTypeHints
| TypeHintInput (List String) Bool Reply
| TypeHintDebounceMsg Debounce.Msg
| TypeHintsLoaded (List String) (Result ApiError (List TypeHint))
| TypeHintsLoaded (List String) String (Result ApiError (List TypeHint))
| FeedbackModalMsg FeedbackModal.Msg
| PhaseModalUpdate Bool (Maybe Uuid)
| SetReply String Reply
Expand Down Expand Up @@ -706,8 +707,8 @@ update msg wrapMsg mbSetFullscreenMsg appState ctx model =
TypeHintDebounceMsg debounceMsg ->
withSeed <| handleTypeHintDebounceMsg appState ctx model debounceMsg

TypeHintsLoaded path result ->
wrap <| handleTypeHintsLoaded appState model path result
TypeHintsLoaded path value result ->
wrap <| handleTypeHintsLoaded appState model path value result

FeedbackModalMsg feedbackModalMsg ->
withSeed <| handleFeedbackModalMsg appState model feedbackModalMsg
Expand Down Expand Up @@ -1235,6 +1236,7 @@ handleShowTypeHints appState ctx model path emptySearch questionUuid value =
typeHints =
Just
{ path = path
, searchValue = value
, hints = Loading
}

Expand All @@ -1258,15 +1260,11 @@ handleTypeHintsInput model path emptySearch reply =
Maybe.withDefault "" (List.last path)

updatedTypeHints =
case model.typeHints of
Just typehints ->
Just typehints

Nothing ->
Just
{ path = path
, hints = Loading
}
Just
{ path = path
, searchValue = ReplyValue.getStringReply reply.value
, hints = Loading
}
in
( Debounce.push
debounceConfig
Expand Down Expand Up @@ -1300,11 +1298,11 @@ handleTypeHintDebounceMsg appState ctx model debounceMsg =
( { model | typeHintsDebounce = typeHintsDebounce }, cmd )


handleTypeHintsLoaded : AppState -> Model -> List String -> Result ApiError (List TypeHint) -> Model
handleTypeHintsLoaded appState model path result =
handleTypeHintsLoaded : AppState -> Model -> List String -> String -> Result ApiError (List TypeHint) -> Model
handleTypeHintsLoaded appState model path value result =
case model.typeHints of
Just typeHints ->
if typeHints.path == path then
if typeHints.path == path && typeHints.searchValue == value then
case result of
Ok hints ->
{ model | typeHints = Just { typeHints | hints = Success hints } }
Expand Down Expand Up @@ -1367,7 +1365,7 @@ loadTypeHints appState ctx model path questionUuid value =
questionUuid
value
appState
(TypeHintsLoaded path)
(TypeHintsLoaded path value)



Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "engine-frontend",
"version": "4.8.1",
"version": "4.8.2",
"repository": "https://github.com/ds-wizard/engine-frontend",
"license": "Apache-2.0",
"scripts": {
Expand Down

0 comments on commit 701cabd

Please sign in to comment.