Releases: uncover-co/elm-widgets
2.0.0
Breaking Changes
Safe time and date inputs (W.InputTime
and W.InputDate
)
Following the pattern we previously used on the int and float inputs, we're not using a custom Value
as input for these functions. This way, we can keep track of the raw browser input internally, which enables us to deal with a number of unexpected states without breaking the user's expected experience.
Compatibility changes to W.InputInt
and W.InputFloat
These inputs were previously returning Int
and Float
and are now returning Maybe Int
and Maybe Float
. This way, we can properly track the state of a blank input and we can also have an "empty valid state" for the viewWithValidation
functions.
This might create a worse user experience for the users that were using the widget in a required state, but a similar behavior might still be achieved by using something like this:
W.InputInt.viewWithValidation
[ W.InputInt.required True ]
{ value = model.value
, onInput =
\result value ->
GotInput
(Result.andThen
(Result.fromMaybe (W.InputInt.ValueMissing "Please fill out this field."))
result
)
value
}
Note: maybe we should either provide a function that does this transparently either as a helper or as a proper view?
Fixes
W.Select
styling changes on Microsoft Edge
MS Edge allows styling an select
element in ways other browsers don't - which is a good thing, however it was causing unexpected accessibility issues since this style was getting only partially inherited from the parent element. We've now addressed this problem so this component behaves as expected in this browser.