From f8e7748fee51e2e140cb969e04b63ff0487c6322 Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Tue, 6 Sep 2022 14:50:29 -0600 Subject: [PATCH] elm-review and doc comment fixes --- src/Highlighter/Style.elm | 2 +- src/Nri/Ui/Highlightable/V1.elm | 7 ++++--- src/Nri/Ui/Highlighter/V1.elm | 5 ++++- styleguide-app/Examples/Colors.elm | 10 ---------- styleguide-app/Examples/Highlighter.elm | 7 ------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/src/Highlighter/Style.elm b/src/Highlighter/Style.elm index 68dfb965..0e499d2c 100644 --- a/src/Highlighter/Style.elm +++ b/src/Highlighter/Style.elm @@ -9,7 +9,7 @@ module Highlighter.Style exposing import Css import Highlighter.Grouping as Grouping -import Nri.Ui.Highlightable.V1 as Highlightable exposing (Highlightable, UIState(..)) +import Nri.Ui.Highlightable.V1 exposing (Highlightable, UIState(..)) import Nri.Ui.HighlighterTool.V1 as Tool diff --git a/src/Nri/Ui/Highlightable/V1.elm b/src/Nri/Ui/Highlightable/V1.elm index a8595999..0f4640e3 100644 --- a/src/Nri/Ui/Highlightable/V1.elm +++ b/src/Nri/Ui/Highlightable/V1.elm @@ -22,7 +22,7 @@ refactor to make it an actual type. # Types -@docs Highlightable, Type, UIState, Model, Attribute +@docs Highlightable, Type, UIState, Attribute # Initializers @@ -32,12 +32,12 @@ refactor to make it an actual type. # Transformations -@docs concat, splitHighlightableOnWords, splitWords, map +@docs splitHighlightableOnWords, splitWords # UIState related -@docs blur, clearHint, hint, hover, isHovered +@docs blur, clearHint, hint, hover # Marker related @@ -87,6 +87,7 @@ type alias Highlightable marker = } +{-| -} type Type = Interactive | Static diff --git a/src/Nri/Ui/Highlighter/V1.elm b/src/Nri/Ui/Highlighter/V1.elm index a3707de9..3dc03654 100644 --- a/src/Nri/Ui/Highlighter/V1.elm +++ b/src/Nri/Ui/Highlighter/V1.elm @@ -28,7 +28,7 @@ Currently, highlighter is used in the following places: # Types -@docs Model, Msg, PointerMsg, ActionInfo, OnClickAction +@docs Model, Msg, PointerMsg, OnClickAction # Init/View/Update @@ -99,6 +99,7 @@ type alias Model marker = } +{-| -} type HasChanged = Changed | NotChanged @@ -215,6 +216,7 @@ type alias ListenTo = Maybe String +{-| -} emptyIntent : Intent emptyIntent = Intent @@ -416,6 +418,7 @@ performAction action model = { model | mouseDownIndex = Nothing } +{-| -} removeHighlights : List (Highlightable marker) -> List (Highlightable marker) removeHighlights = Internal.removeHighlights diff --git a/styleguide-app/Examples/Colors.elm b/styleguide-app/Examples/Colors.elm index a1cfd51f..5de82119 100644 --- a/styleguide-app/Examples/Colors.elm +++ b/styleguide-app/Examples/Colors.elm @@ -65,16 +65,6 @@ example = } -all : List ( String, Css.Color ) -all = - [ uncategorizedColors - , backgroundHighlightColors - , textHighlightColors - ] - |> List.concat - |> List.map (\( name, val, _ ) -> ( name, val )) - - uncategorizedColors : List ( String, Css.Color, String ) uncategorizedColors = [ ( "gray20", Colors.gray20, "Main text" ) diff --git a/styleguide-app/Examples/Highlighter.elm b/styleguide-app/Examples/Highlighter.elm index 8a3dbdab..71a04c60 100644 --- a/styleguide-app/Examples/Highlighter.elm +++ b/styleguide-app/Examples/Highlighter.elm @@ -6,27 +6,20 @@ module Examples.Highlighter exposing (Msg, State, example) -} -import Accessibility.Styled.Key as Key import Category exposing (Category(..)) -import Code import CommonControls import Css exposing (Color) import Debug.Control as Control exposing (Control) -import Debug.Control.Extra as ControlExtra import Debug.Control.View as ControlView -import EllieLink import Example exposing (Example) import Examples.Colors import Html.Styled exposing (..) -import Html.Styled.Attributes exposing (css) import Nri.Ui.Colors.V1 as Colors import Nri.Ui.Heading.V3 as Heading import Nri.Ui.Highlightable.V1 as Highlightable exposing (Highlightable) import Nri.Ui.Highlighter.V1 as Highlighter import Nri.Ui.HighlighterTool.V1 as Tool import Nri.Ui.Table.V6 as Table -import Nri.Ui.UiIcon.V1 as UiIcon -import Set exposing (Set) moduleName : String