You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update from Elm 0.18's Navigation.program to Elm 0.19's Browser.application
* 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.
0 commit comments