forked from rgrempel/elm-route-url
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update from Elm 0.18's Navigation.program to Elm 0.19's Browser.appli…
…cation * adapt to the new Browser.application API in the following ways: * mirror the two-phase handling of URL changes in Browser.application's 'onUrlRequest' and 'onUrlChange' by bifurcating the RouterMsg variant of WrappedMsg into RouterMsgOnUrlChange and RouterMsgOnUrlRequestInternal variants. * add a slot to RouterModel to store the new Browser.Navigation.Key, and in the update function, use it to invoke Browser.Navigation.pushUrl in response to a urlRequestInternal. * create a new 'onExternalUrlRequest' function for the user to implement, since RouteUrl can handle internal requests for the user, but can't do anything sensible with external requests (as suggested by @basti1302). * eliminate the distinction between App and AppWithFlags, and all related duplication, as there is no variant of the new Browser.application that doesn't support flags. * make UrlChange more strongly typed, mirroring the structure of the Url.Url record type from elm/url, and rework the way UrlChanges are converted to Cmds with a new 'apply : Url -> UrlChange -> Url' function. * update all examples to work with the new API and 0.19 generally * include work-arounds for a couple of elm/url bugs (elm/url#37 and elm/url#17) * store the base path in ExampleViewer.Model to illustrate absolute path requirement of UrlChange * build the examples with '--debug' so users can get an idea for how they work under the hood * update README * remove references to complementary packages that aren't compatible with 0.19 (which is all of them) * remove the RouteUrl.Builder module and the use of the sporto/erl package, as this functionality is now largely provided by elm/url. * remove the older RouteHash module, as it was only present to ease the transition from elm-route-hash to elm-route-url. also remove example code illustrating its use.
- Loading branch information
Showing
34 changed files
with
2,223 additions
and
2,529 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"type": "package", | ||
"name": "rgrempel/elm-route-url", | ||
"summary": "Router for single-page-apps in Elm", | ||
"license": "MIT", | ||
"version": "5.0.0", | ||
"exposed-modules": [ | ||
"RouteUrl" | ||
], | ||
"elm-version": "0.19.0 <= v < 0.20.0", | ||
"dependencies": { | ||
"ccapndave/elm-update-extra": "4.0.0 <= v < 5.0.0", | ||
"elm/browser": "1.0.0 <= v < 2.0.0", | ||
"elm/core": "1.0.0 <= v < 2.0.0", | ||
"elm/html": "1.0.0 <= v < 2.0.0", | ||
"elm/http": "1.0.0 <= v < 2.0.0", | ||
"elm/regex": "1.0.0 <= v < 2.0.0", | ||
"elm/url": "1.0.0 <= v < 2.0.0" | ||
}, | ||
"test-dependencies": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.