Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e4da94e

Browse files
committed
add codeowners
1 parent c580935 commit e4da94e

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

‎CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@scrive/elm-developers

‎src/Json/Schema/Form/Fields.elm

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import Html.Attributes
2121
)
2222
import Html.Attributes.Extra as Attr
2323
import Html.Events exposing (preventDefaultOn)
24+
import Html.Extra as Html
2425
import Html.Keyed
2526
import Json.Decode
2627
import Json.Schema.Definitions
@@ -288,13 +289,11 @@ checkbox options path schema f =
288289

289290
meta : List (Html F.Msg)
290291
meta =
291-
[ fieldDescription schema ]
292-
|> List.filterMap identity
292+
Maybe.values [ fieldDescription schema ]
293293

294294
feedback : List (Html F.Msg)
295295
feedback =
296-
[ liveError options.errors f ]
297-
|> List.filterMap identity
296+
Maybe.values [ liveError options.errors f ]
298297
in
299298
div
300299
[ classList
@@ -520,13 +519,11 @@ field options schema f content =
520519
let
521520
meta : List (Html F.Msg)
522521
meta =
523-
[ fieldDescription schema ]
524-
|> List.filterMap identity
522+
Maybe.values [ fieldDescription schema ]
525523

526524
feedback : List (Html F.Msg)
527525
feedback =
528-
[ liveError options.errors f ]
529-
|> List.filterMap identity
526+
Maybe.values [ liveError options.errors f ]
530527
in
531528
div
532529
[ classList
@@ -569,15 +566,11 @@ group options path schema form =
569566

570567
meta : List (Html msg)
571568
meta =
572-
[ Maybe.map (\str -> p [] [ text str ]) schema.description
573-
]
574-
|> List.filterMap identity
569+
schema.description |> Html.viewMaybe (\str -> p [] [ text str ]) |> List.singleton
575570

576571
feedback : List (Html F.Msg)
577572
feedback =
578-
[ liveError options.errors f
579-
]
580-
|> List.filterMap identity
573+
Maybe.values [ liveError options.errors f ]
581574
in
582575
div
583576
[ classList

‎src/Json/Schema/Form/Validation.elm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import Json.Schema.Form.Error exposing (ErrorValue(..))
4646
import Json.Schema.Form.Format exposing (Format)
4747
import Json.Schema.Form.Regex
4848
import Json.Schema.Form.Value exposing (Value(..))
49+
import Maybe.Extra as Maybe
4950
import Regex
5051
import Set
5152

@@ -462,7 +463,7 @@ switch formats schemata =
462463
else
463464
Nothing
464465
)
465-
|> List.filterMap identity
466+
|> Maybe.values
466467
|> List.head
467468
|> Maybe.withDefault (fail (customError Invalid))
468469
)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /