combination of mapEditorWriteError and container2 in editor definitions breaks UI
Summary
Defining editors using mapEditorWriteError
on a container2
results in duplicated hint icons and server crashes after some edits.
Steps to reproduce
This is a minimal example:
updateInformation [UpdateUsing id const editor] (0, 0)
editor :: Editor (Int, Int) (?(Int, Int))
editor =
mapEditorWriteError
( \(i, j) ->
case (i, j) of
(?Just i, ?Just j) = Ok (i, j)
_ = Error "error"
)
(container2 (gEditor{|*|} EditValue) (gEditor{|*|} EditValue))
What is the current bug behavior?
Making the first field invalid (e.g. by removing the "0") leads to duplicated hint icons:
Filling in a value value again causes a server crash:
extractUIWithEffects_: Wrapped item is missing
What is the expected correct behavior?
When the first field is invalid, I'd expect to see two error icons. One with the message generated by the integer editor and a second one for the entire editor with message "error"
. It should be visually clear that the second icons refers to the entire editor.
Relevant logs, screenshots, ...
see above