🎨 elm-format

This commit is contained in:
Richard Feldman
2018-02-22 17:00:38 -05:00
parent 40c66a8a10
commit c8c89adc63
60 changed files with 4253 additions and 124 deletions

View File

@@ -1,10 +1,10 @@
port module ElmHub exposing (..)
import Auth
import Html exposing (..)
import Html.Attributes exposing (class, target, href, defaultValue, type_, checked, placeholder, value)
import Html.Attributes exposing (checked, class, defaultValue, href, placeholder, target, type_, value)
import Html.Events exposing (..)
import Html.Lazy exposing (lazy, lazy3)
import Auth
import Json.Decode exposing (Decoder)
import Json.Decode.Pipeline exposing (..)
import String
@@ -89,11 +89,12 @@ viewOptions opts =
, input
[ type_ "text"
, placeholder "Enter a username"
-- TODO replace opts.userFilter with the following:
--
-- (Debug.log "username" opts.userFilter)
--
-- This way, we'll see console output whenever this gets run!
-- TODO replace opts.userFilter with the following:
--
-- (Debug.log "username" opts.userFilter)
--
-- This way, we'll see console output whenever this gets run!
, defaultValue opts.userFilter
, onInput SetUserFilter
]
@@ -160,7 +161,7 @@ update msg model =
newModel =
{ model | results = newResults }
in
( newModel, Cmd.none )
( newModel, Cmd.none )
SetTableState tableState ->
( { model | tableState = tableState }, Cmd.none )
@@ -243,8 +244,9 @@ view model =
]
]
, viewErrorMessage model.errorMessage
-- TODO add a lazy3 to wrap Table.view.
-- (We have no Debug.log for verification this time.)
-- TODO add a lazy3 to wrap Table.view.
-- (We have no Debug.log for verification this time.)
, Table.view tableConfig model.tableState model.results
]
@@ -322,7 +324,7 @@ getQueryString model =
++ "+in:"
++ model.options.searchIn
++ "+stars:>="
++ (toString model.options.minStars)
++ toString model.options.minStars
++ "+language:elm"
++ (if String.isEmpty model.options.userFilter then
""