Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ellie Link Generator - v1 (Stateless & Messageless Files Only) #64

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fef7534
URL Generator Works, can fetch version in JS
joshuanianji Oct 22, 2020
4699294
Elm version of HTTP Request
joshuanianji Oct 22, 2020
58d3ba1
Sent hardcoded version as flag. Removed HTTP
joshuanianji Oct 27, 2020
b8a992d
Merge with upstream
joshuanianji Oct 27, 2020
464f072
use parsing to make the URL generator better
joshuanianji Oct 29, 2020
c09ff39
Merge with upstream
joshuanianji Oct 29, 2020
83be31b
Forgot to commit config.yml when merging with upstream
joshuanianji Oct 29, 2020
a824446
Removed unnecessary DemoBoxMetaInfo code
joshuanianji Oct 29, 2020
a34ebd1
:art: Format
joshuanianji Oct 29, 2020
2ab8f79
Fixed bug where parsing fails on let statements
joshuanianji Oct 29, 2020
4831083
Undo changes to config.yml
joshuanianji Oct 29, 2020
2f3043d
rename "version" to "elmAntdVersion"
joshuanianji Oct 29, 2020
bf981f3
update elm version in UrlGenerator
joshuanianji Oct 29, 2020
af00301
Changed 'elmAntdVersion' to `Maybe String`
joshuanianji Oct 29, 2020
67b5a1a
Small changes to Url Generator before splitting it up
joshuanianji Oct 29, 2020
40a6227
Use Url.Builder for Url Encoding
joshuanianji Oct 29, 2020
06bb9d4
Split UrlGenerator into two files
joshuanianji Oct 29, 2020
db7c2a3
Merge branch 'master' into ellie-links
joshuanianji Oct 29, 2020
6f01768
Merged with upstream
Dec 4, 2020
c17bded
Use extensible records to enforce versioning
Dec 4, 2020
423d65c
flags.version -> flags.elmAntdVersion
joshuanianji Dec 4, 2020
2170628
Improved `fromSourceCode` function signature
joshuanianji Dec 4, 2020
573ec47
elliefy now returns a Result
joshuanianji Dec 4, 2020
0bb2d24
EllieLinks.fromSourceCode also returns a Result
joshuanianji Dec 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,4 @@ workflows:
- install_deps
filters:
branches:
ignore: master
ignore: master
2 changes: 1 addition & 1 deletion showcase/elm.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/parser": "1.1.0",
"elm/svg": "1.0.1",
"elm/url": "1.0.0",
"elm-community/list-extra": "8.2.4",
Expand All @@ -26,7 +27,6 @@
"indirect": {
"elm/bytes": "1.0.8",
"elm/file": "1.0.5",
"elm/parser": "1.1.0",
"elm/regex": "1.0.0",
"elm/time": "1.0.0",
"elm/virtual-dom": "1.0.2",
Expand Down
20 changes: 10 additions & 10 deletions showcase/src/elm/Router.elm
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ fetchComponentExamples { commitHash, fileServerUrl, examplesFetched } routeName


init : Url -> Flags -> ( Model, Cmd Msg )
init url { commitHash, fileServerUrl } =
init url { commitHash, fileServerUrl, elmAntdVersion } =
let
route =
fromUrl url
Expand All @@ -377,15 +377,15 @@ init url { commitHash, fileServerUrl } =
, commitHash = commitHash
, fileServerUrl = fileServerUrl
, footer = Footer.initialModel
, alertPageModel = AlertPage.route.initialModel
, buttonPageModel = ButtonPage.route.initialModel
, checkboxPageModel = CheckboxPage.route.initialModel
, dividerPageModel = DividerPage.route.initialModel
, formPageModel = FormPage.route.initialModel
, inputPageModel = InputPage.route.initialModel
, spacePageModel = SpacePage.route.initialModel
, typographyPageModel = TypographyPage.route.initialModel
, tooltipPageModel = TooltipPage.route.initialModel
, alertPageModel = AlertPage.route.initialModel elmAntdVersion
, buttonPageModel = ButtonPage.route.initialModel elmAntdVersion
, checkboxPageModel = CheckboxPage.route.initialModel elmAntdVersion
, dividerPageModel = DividerPage.route.initialModel elmAntdVersion
, formPageModel = FormPage.route.initialModel elmAntdVersion
, inputPageModel = InputPage.route.initialModel elmAntdVersion
, spacePageModel = SpacePage.route.initialModel elmAntdVersion
, typographyPageModel = TypographyPage.route.initialModel elmAntdVersion
, tooltipPageModel = TooltipPage.route.initialModel elmAntdVersion
}
in
( model
Expand Down
23 changes: 13 additions & 10 deletions showcase/src/elm/Routes/AlertComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type alias Model =
, descriptionExample : Container.Model () Never
, typeExample : Container.Model () Never
, closeableExample : Container.Model CloseableExample.Model CloseableExample.Msg
, version : Maybe String
}


Expand Down Expand Up @@ -78,10 +79,10 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| basicExample = Container.setSourceCode examplesSourceCode model.basicExample
, typeExample = Container.setSourceCode examplesSourceCode model.typeExample
, closeableExample = Container.setSourceCode examplesSourceCode model.closeableExample
, descriptionExample = Container.setSourceCode examplesSourceCode model.descriptionExample
| basicExample = Container.setSourceCode model.version examplesSourceCode model.basicExample
, typeExample = Container.setSourceCode model.version examplesSourceCode model.typeExample
, closeableExample = Container.setSourceCode model.version examplesSourceCode model.closeableExample
, descriptionExample = Container.setSourceCode model.version examplesSourceCode model.descriptionExample
}
, Cmd.none
)
Expand All @@ -95,12 +96,14 @@ route =
, update = update
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
, initialModel =
{ basicExample = Container.initModel "BasicExample.elm"
, typeExample = Container.initModel "TypeExample.elm"
, descriptionExample = Container.initModel "DescriptionExample.elm"
, closeableExample =
Container.initStatefulModel "CloseableExample.elm" CloseableExample.init CloseableExample.update
}
\v ->
{ basicExample = Container.initModel "BasicExample.elm"
, typeExample = Container.initModel "TypeExample.elm"
, descriptionExample = Container.initModel "DescriptionExample.elm"
, closeableExample =
Container.initStatefulModel "CloseableExample.elm" CloseableExample.init CloseableExample.update
, version = v
}
}


Expand Down
33 changes: 18 additions & 15 deletions showcase/src/elm/Routes/ButtonComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type alias Model =
{ typeExample : Container.Model () Never
, disabledExample : Container.Model () DisabledExample.Msg
, iconExample : Container.Model () IconExample.Msg
, version : Maybe String
}


Expand Down Expand Up @@ -65,9 +66,9 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| typeExample = Container.setSourceCode examplesSourceCode model.typeExample
, disabledExample = Container.setSourceCode examplesSourceCode model.disabledExample
, iconExample = Container.setSourceCode examplesSourceCode model.iconExample
| typeExample = Container.setSourceCode model.version examplesSourceCode model.typeExample
, disabledExample = Container.setSourceCode model.version examplesSourceCode model.disabledExample
, iconExample = Container.setSourceCode model.version examplesSourceCode model.iconExample
}
, Cmd.none
)
Expand All @@ -81,18 +82,20 @@ route =
, update = update
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
, initialModel =
{ typeExample = Container.initModel "TypeExample.elm"
, iconExample =
Container.initStatefulModel
"IconExample.elm"
()
(\_ _ -> ( (), Cmd.none ))
, disabledExample =
Container.initStatefulModel
"DisabledExample.elm"
()
(\_ _ -> ( (), Cmd.none ))
}
\v ->
{ typeExample = Container.initModel "TypeExample.elm"
, iconExample =
Container.initStatefulModel
"IconExample.elm"
()
(\_ _ -> ( (), Cmd.none ))
, disabledExample =
Container.initStatefulModel
"DisabledExample.elm"
()
(\_ _ -> ( (), Cmd.none ))
, version = v
}
}


Expand Down
23 changes: 13 additions & 10 deletions showcase/src/elm/Routes/CheckboxComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type alias Model =
{ basicExample : Container.Model BasicExample.Model BasicExample.Msg
, disabledExample : Container.Model () Never
, controlledExample : Container.Model ControlledExample.Model ControlledExample.Msg
, version : Maybe String
}


Expand Down Expand Up @@ -64,9 +65,9 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| basicExample = Container.setSourceCode examplesSourceCode model.basicExample
, disabledExample = Container.setSourceCode examplesSourceCode model.disabledExample
, controlledExample = Container.setSourceCode examplesSourceCode model.controlledExample
| basicExample = Container.setSourceCode model.version examplesSourceCode model.basicExample
, disabledExample = Container.setSourceCode model.version examplesSourceCode model.disabledExample
, controlledExample = Container.setSourceCode model.version examplesSourceCode model.controlledExample
}
, Cmd.none
)
Expand All @@ -80,13 +81,15 @@ route =
, update = update
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
, initialModel =
{ basicExample =
Container.initStatefulModel "BasicExample.elm" BasicExample.init BasicExample.update
, controlledExample =
Container.initStatefulModel "ControlledExample.elm" ControlledExample.init ControlledExample.update
, disabledExample =
Container.initModel "DisabledExample.elm"
}
\v ->
{ basicExample =
Container.initStatefulModel "BasicExample.elm" BasicExample.init BasicExample.update
, controlledExample =
Container.initStatefulModel "ControlledExample.elm" ControlledExample.init ControlledExample.update
, disabledExample =
Container.initModel "DisabledExample.elm"
, version = v
}
}


Expand Down
21 changes: 12 additions & 9 deletions showcase/src/elm/Routes/DividerComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type alias Model =
, textWithoutHeadingExample : StatelessDemo
, withTitleExample : StatelessDemo
, verticalExample : StatelessDemo
, version : Maybe String
}


Expand Down Expand Up @@ -82,10 +83,10 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| verticalExample = Container.setSourceCode examplesSourceCode model.verticalExample
, withTitleExample = Container.setSourceCode examplesSourceCode model.withTitleExample
, horizontalExample = Container.setSourceCode examplesSourceCode model.horizontalExample
, textWithoutHeadingExample = Container.setSourceCode examplesSourceCode model.textWithoutHeadingExample
| verticalExample = Container.setSourceCode model.version examplesSourceCode model.verticalExample
, withTitleExample = Container.setSourceCode model.version examplesSourceCode model.withTitleExample
, horizontalExample = Container.setSourceCode model.version examplesSourceCode model.horizontalExample
, textWithoutHeadingExample = Container.setSourceCode model.version examplesSourceCode model.textWithoutHeadingExample
}
, Cmd.none
)
Expand All @@ -98,11 +99,13 @@ route =
, view = view
, update = update
, initialModel =
{ horizontalExample = Container.initModel "HorizontalExample.elm"
, textWithoutHeadingExample = Container.initModel "TextWithoutHeadingExample.elm"
, withTitleExample = Container.initModel "WithTitleExample.elm"
, verticalExample = Container.initModel "VerticalExample.elm"
}
\v ->
{ horizontalExample = Container.initModel "HorizontalExample.elm"
, textWithoutHeadingExample = Container.initModel "TextWithoutHeadingExample.elm"
, withTitleExample = Container.initModel "WithTitleExample.elm"
, verticalExample = Container.initModel "VerticalExample.elm"
, version = v
}
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
}

Expand Down
11 changes: 7 additions & 4 deletions showcase/src/elm/Routes/FormComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import Utils exposing (ComponentCategory(..), DocumentationRoute, SourceCode)

type alias Model =
{ basicExample : Container.Model BasicExample.Model BasicExample.Msg
, version : Maybe String
}


Expand All @@ -45,7 +46,7 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| basicExample = Container.setSourceCode examplesSourceCode model.basicExample
| basicExample = Container.setSourceCode model.version examplesSourceCode model.basicExample
}
, Cmd.none
)
Expand All @@ -59,9 +60,11 @@ route =
, update = update
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
, initialModel =
{ basicExample =
Container.initStatefulModel "BasicExample.elm" BasicExample.init BasicExample.update
}
\v ->
{ basicExample =
Container.initStatefulModel "BasicExample.elm" BasicExample.init BasicExample.update
, version = v
}
}


Expand Down
41 changes: 22 additions & 19 deletions showcase/src/elm/Routes/InputComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ type alias Model =
{ basicExample : Container.Model BasicExample.Model BasicExample.Msg
, passwordExample : Container.Model PasswordExample.Model PasswordExample.Msg
, textAreaExample : Container.Model TextAreaExample.Model TextAreaExample.Msg
, version : Maybe String
}


Expand All @@ -47,22 +48,24 @@ route =
, view = view
, update = update
, initialModel =
{ basicExample =
Container.initStatefulModel
"BasicExample.elm"
BasicExample.init
BasicExample.update
, passwordExample =
Container.initStatefulModel
"PasswordExample.elm"
PasswordExample.init
PasswordExample.update
, textAreaExample =
Container.initStatefulModel
"TextAreaExample.elm"
TextAreaExample.init
TextAreaExample.update
}
\v ->
{ basicExample =
Container.initStatefulModel
"BasicExample.elm"
BasicExample.init
BasicExample.update
, passwordExample =
Container.initStatefulModel
"PasswordExample.elm"
PasswordExample.init
PasswordExample.update
, textAreaExample =
Container.initStatefulModel
"TextAreaExample.elm"
TextAreaExample.init
TextAreaExample.update
, version = v
}
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
}

Expand Down Expand Up @@ -95,9 +98,9 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| basicExample = Container.setSourceCode examplesSourceCode model.basicExample
, passwordExample = Container.setSourceCode examplesSourceCode model.passwordExample
, textAreaExample = Container.setSourceCode examplesSourceCode model.textAreaExample
| basicExample = Container.setSourceCode model.version examplesSourceCode model.basicExample
, passwordExample = Container.setSourceCode model.version examplesSourceCode model.passwordExample
, textAreaExample = Container.setSourceCode model.version examplesSourceCode model.textAreaExample
}
, Cmd.none
)
Expand Down
17 changes: 10 additions & 7 deletions showcase/src/elm/Routes/SpaceComponent.elm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type alias StatelessDemo =
type alias Model =
{ basicExample : StatelessDemo
, verticalAndSpacingExample : StatelessDemo
, version : Maybe String
}


Expand All @@ -48,11 +49,13 @@ route =
, view = view
, update = update
, initialModel =
{ basicExample =
Container.initModel "BasicExample.elm"
, verticalAndSpacingExample =
Container.initModel "VerticalAndSpacingExample.elm"
}
\v ->
{ basicExample =
Container.initModel "BasicExample.elm"
, verticalAndSpacingExample =
Container.initModel "VerticalAndSpacingExample.elm"
, version = v
}
, saveExampleSourceCodeToModel = ExampleSourceCodeLoaded
}

Expand All @@ -78,8 +81,8 @@ update msg model =

ExampleSourceCodeLoaded examplesSourceCode ->
( { model
| basicExample = Container.setSourceCode examplesSourceCode model.basicExample
, verticalAndSpacingExample = Container.setSourceCode examplesSourceCode model.verticalAndSpacingExample
| basicExample = Container.setSourceCode model.version examplesSourceCode model.basicExample
, verticalAndSpacingExample = Container.setSourceCode model.version examplesSourceCode model.verticalAndSpacingExample
}
, Cmd.none
)
Expand Down
Loading