Breaking changes in bold.
You can now sponsor Laminar / Airstream / Waypoint development!
-
Build: Upgrade to Laminar v18.0.0-M2
-
API:
/ endOfSegmentsthe default behaviour now with URL-DSL v0.7.0.- Migration: To retain existing behaviour, for your segment paths that don't end in
/ endOfSegments, append/ ignoreRemainingSegmentsto the path; and remove/ endOfSegmentsfrom any segment paths that do have it.
- Migration: To retain existing behaviour, for your segment paths that don't end in
-
API: Replace Router.initialUrl constructor param with a by-name currentUrl arg (and more).
- With typical setup, the default value should be used, just as before.
currentUrllets you modify the URL seen by Waypoint, e.g. if any cleanup or corrections are needed.
- With typical setup, the default value should be used, just as before.
-
Fix: Allow using fragment paths after
#that don't start with '/'. Previously Waypoint would fail to match such URLs. This fix might be needed e.g. to handle Keycloak.js appending#state=...to your URLs. -
Naming: Route.matchRelativeUrl -> matchAbsoluteUrl (it was incorrectly named)
- New: Overload for
router.navigateTothat acceptsSignal[Page]instead ofPage. - New:
Router[Page]now extends traitsRouter.In[-Page],Router.Out[+Page], andRouter.All[Page]that make it easier to abstract over routing functionality. For example, if you want to write a helper that needs contravariance inPage, you can useRouter.In[-Page]instead of the invariantRouter. Thanks, @arturaz! - New: All errors thrown by waypoint are now of new type
WaypointException, and their message has[Waypoint]prepended to it. Thanks, @arturaz! - Fix: URL matching bug fix for Tauri (#28). Thanks, @arturaz!
- Build: Waypoint depends on Laminar now (not just Airstream)
- New:
navigateToexample method from the docs is now available onRouter- Unlike the previous example in the docs, it does not reset scroll position – do that yourself by observing
currentPageSignal
- Unlike the previous example in the docs, it does not reset scroll position – do that yourself by observing
- Migration:
Routerconstructor is now a single argument list,popStateEventsandownernow have default values.
- New:
- New: Total and Partial route types, to improve type-safety for the total routes – by Artūras Šlajus – thank you!
- New:
route.argsFromPageTotalandroute.relativeUrlForPageavailable onRoute.Totalsubtype ofRoute. - Migration: If
Route.staticcomplains that it can't findValueOffor your page type, it's because your type is not a singleton likeobject LoginPage, so we can't make a total route for it. UseRoute.staticPartialinstead.
- New:
- New:
Router.replacePageTitle - Fix:
SplitRender.signalshould be a lazy val, not def. - Build: scalamft config
- Note: Airstream has a new Split by pattern match feature that you may want to use instead of SplitRender in Scala 3. It's similar in functionality, but macro-based, and more robust.
- Build: Update URL DSL to 0.6.2
- Fixed a case with
listParamwhere matching failed if no query parameters were provided in the URL, whereas it should have matched asNil. Thanks, @arturaz!
- Fixed a case with
- Build: Update Airstream to 17.0.0, URL DSL to 0.6.1
- Build: Fix source maps URLs
- Misc: Unrouted page exception now includes the exact faulty page in the message
- Build: Update Airstream to 16.0.0
- Build: Update Airstream to 15.0.0, URL DSL to 0.6.0
- Fix:
collectStaticandcollectStaticStrictnow match pages using==equality instead of ClassTag. This fixes matching of Scala 3 enum values.
- Build: Update Airstream to 15.0.0-M4
- Build: Update Airstream to 15.0.0-M3
- Build: Update Airstream to 15.0.0-M2
- Build: Update Airstream to 15.0.0-M1, URL-DSL to 0.5.0, etc.
- Naming:
$popStateEvent->popStateEvents - Naming:
$currentPage->currentPageSignal - Naming:
$view->signal - API: Use
Tuplez.unapply. Fixes this issue. Thanks, @yurique! - API: Non-optional query params now match empty strings, e.g.
url?param=and evenurl?param. See this issue. Thanks, @i10416 - New:
collectStaticStrictfor when you want to cache the element.
- Build: Update Airstream to 0.14.0, bump Scala to 2.13.6 and 3.0.2, Scala.js to 1.7.1, uPickle to 1.4.2
- Fix: Work around
location.originbeing"null"forfile://URLs in Firefox.
- Do not use – this version is similar to v0.4.2, but there's a typo in one of the error messages
- Fix: When initializing the router, do not update the initial URL to the canonical URL of the initial page
- Keep the original URL with whatever extraneous query params it might have, to give any third party tools you might be using a chance to look at them
- Fix: Respond to
hashChangeevents properly - New: Base path and fragment matching
- You can now match routes like
/#/note/123instead of/note/123by providingbasePath = Route.fragmentBasePathto Route constructors - You can also use hash routing on a
file://URL now
- You can now match routes like
- New: Basic route helpers to match URL fragments (text after
#)
- New: Routes can match types partially now (thanks, @pbuszka!)
- New route creation methods with PF suffix
route.argsFromPagereturns an Option now
- New: Customizable error handling
- You can now specify fallbacks for URLs and page states that fail to match
- You can now force-render a page without changing URL (useful for rendering full page error screens)
Routerconstructor arguments have changed and are now spread across two argument lists, and some arguments have defaults now
- New: ContextRouteBuilder (thanks, @pbuszka!)
- Provides a convenient way to encode URL params like "lang" or "version" that are shared among a set of pages & routes
- API: Use
PatternArgsalias for URL DSL'sUlrMatchingtype - Build: Update
Airstreamto0.12.0 - Build: Update
url-dslto0.3.2- See URL DSL migration notes
- Note: in Waypoint, the required imports stay the same.
- Build: Update
sbtto1.4.7
- API: Waypoint does not depend on Laminar anymore
- Add
$popStateEventtoRouterconstructor - Migration: You should provide
$popStateEvent = windowEvents.onPopStateif using Laminar
- Add
Initial release!