From 8abd06f233df342e8be7a26618cbb17748933eb0 Mon Sep 17 00:00:00 2001 From: Richard Feldman Date: Tue, 14 Aug 2018 01:50:04 -0400 Subject: [PATCH] Update intro/part3 --- intro/part3/elm.json | 4 +--- intro/part3/src/Main.elm | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/intro/part3/elm.json b/intro/part3/elm.json index dd41cae..a275859 100644 --- a/intro/part3/elm.json +++ b/intro/part3/elm.json @@ -6,15 +6,13 @@ "elm-version": "0.19.0", "dependencies": { "direct": { - "elm/browser": "1.0.0", "elm/core": "1.0.0", "elm/html": "1.0.0" }, "indirect": { "elm/json": "1.0.0", "elm/time": "1.0.0", - "elm/url": "1.0.0", - "elm/virtual-dom": "1.0.0" + "elm/url": "1.0.0" } }, "test-dependencies": { diff --git a/intro/part3/src/Main.elm b/intro/part3/src/Main.elm index 9b9d1c8..e41e705 100644 --- a/intro/part3/src/Main.elm +++ b/intro/part3/src/Main.elm @@ -1,6 +1,6 @@ module Main exposing (main) --- 👇 You can see our new `Article` module in `src/Article.elm` +-- FYI: 👇 You can see our new `Article` module in `src/Article.elm` import Article import Browser @@ -9,6 +9,7 @@ import Html.Attributes exposing (..) import Html.Events exposing (onClick) + -- MODEL @@ -27,12 +28,10 @@ update msg model = {- 👉 TODO: If `msg.description` is "ClickedTag", then set the model's `selectedTag` field to be `msg.data` - 💡 HINT 1: record update syntax looks like this: + 💡 HINT: record update syntax looks like this: { model | foo = bar } - 💡 HINT 2: Don't forget, every `if` must have an `else`! - -} model @@ -43,7 +42,7 @@ update msg model = view model = let - {- 👉 TODO: Filter the articles down to onl the ones + {- 👉 TODO: Filter the articles down to only the ones that include the currently selected tag. 💡 HINT: Replace `True` below with something involving @@ -96,6 +95,7 @@ viewTag selectedTagName tagName = otherClass = if tagName == selectedTagName then "tag-selected" + else "tag-default" in