noredink-ui/styleguide-app
Hardy Jones 0a75e8229b
Extract Nri.Icon from the monolith
The recommendation is to break the styles API rather than the view API
when moving something out of the monolith into this repo.

`Nri.Icon` is not really setup for that sort of breakage.
If we would prefer to have the styles break rather than the view,
that will take more work.
Work that can be done independent of the extraction.

The transition in the monolith ought to look something like:

```elm
module Nri.Icon exposing (..)

import Html exposing (Html)
import Nri.SvgSprite
import Nri.Ui.Icon.V1 exposing (Assets, IconType)

icon : { alt : String, icon : IconType } -> Html msg
icon config =
  Nri.Ui.Icon.V1.icon assets

assets : Assets {}
assets =
  { activity = Nri.SvgSprite.activity
  , arrowDown = Nri.SvgSprite.arrowDown
  , attention_svg = Nri.Assets.attention_svg
  ...
  }
```

So hopefully, the change is still very small on the monolith side.

There's maybe a bigger concern than which API breaks.
`Nri.Icon` has some behavior for a11y.
We could definitely change the internals over during the extraction.
But, since all of these changes are value-level changes,
it's very likely that we'll break something in the process.
That's a bigger concern because instead of affecting
the handful of Engineers working at NRI,
we would be affecting the millions of people using the site.

We shouldn't fear making those kinds of changes.
However, we should make them when we can give them the appropriate
attention they deserve.
Not when one person is trying to move as fast as possible to avoid
race conditions of moving modules between repos.
2018-03-28 18:20:16 -07:00
..
assets Add TextArea to styleguide 2018-02-28 16:22:48 -08:00
Examples Extract Nri.Icon from the monolith 2018-03-28 18:20:16 -07:00
.gitignore Remove and .gitignore elm.js 2018-02-20 15:09:29 +01:00
elm-package.json Extract Nri.Icon from the monolith 2018-03-28 18:20:16 -07:00
index.html Add TextArea to styleguide 2018-02-28 16:22:48 -08:00
Main.elm add mini styleguide for ui components 2018-02-12 13:32:38 -08:00
Model.elm add mini styleguide for ui components 2018-02-12 13:32:38 -08:00
ModuleExample.elm Nri.Colors -> Nri.Ui.Colors.V1 2018-03-16 17:33:24 -07:00
NriModules.elm Extract Nri.Icon from the monolith 2018-03-28 18:20:16 -07:00
README.md Add instructions on starting the styleguide app 2018-02-20 15:19:42 +01:00
Routes.elm add mini styleguide for ui components 2018-02-12 13:32:38 -08:00
Update.elm add mini styleguide for ui components 2018-02-12 13:32:38 -08:00
View.elm Nri.Colors -> Nri.Ui.Colors.V1 2018-03-16 17:33:24 -07:00

NoRedInk style guide

A helper app to test out new styles while working with the package.

Running this app

Generate the elm code:

elm-make Main.elm --output elm.js

Open index.html in a browser:

open index.html