Skip to content

v1.0.0-rc.0 — Release Candidate

Pre-release
Pre-release
Compare
Choose a tag to compare
@web-padawan web-padawan released this 05 Jul 14:41
a4f4231

Live Demo ↗
API documentation ↗

⚠️Breaking Changes Since v0.4.0:

  • Updated the main entry in package.json to use ES module version for better tools compatibility. UMD bundle still exists, in order to use it you should include it to your project manually from the node_modules/@vaadin/router/dist/vaadin-router.umd.min.js.
  • The public API has been changed significantly to be more consistent using new location object:
    • the route property on the view components is replaced with the location
    • the vaadin-router-route-changed event renamed into vaadin-router-location-changed
    • the activeRoutes property on the routes instance is replaced with location.routes
    • the router.ready property now returns a Promise which resolves in the location object
    • the context argument for the lifecycle callbacks also replaced with the location
  • Added the new commands object which should be used to prevent or redirect navigation from the lifecycle callbacks or custom route actions, e. g. context.cancel() is now commands.prevent()
  • Removed the possibility to return a Promise from onAfterLeave and onAfterEnter callbacks, as the feature in these cases was considered to be not reliable enough in certain edge cases. From now, only onBeforeEnter and onBeforeLeave callbacks may return a Promise
  • Changed the order of the lifecycle callbacks, now onAfterEnter callbacks on the new view components get executed before onAfterLeave callbacks on the old view components
  • Changed bundle property on the route config object to accept module and nomodule paths

Bug Fixes

  • Lifecycle callbacks are called properly when the route is the same and only parameters changed
  • Fixed the "not found page" error not processed correctly when using parent layouts
  • Fixed the issue with parent layouts when nested component remained after navigation
  • Fixed the silent failure for case when the children function returns incorrect result

Changes Since v0.4.0:

  • c82677c Call onAfterEnter before calling onAfterLeave (#226)
  • 371b92d Change the result of router.ready from outlet to location (#225)
  • ffac12e Refactor animations code (#224)
  • 9e79a64 Use location and commands instead of context in the public API (#222)
  • 5fb5bed Fix parent layouts: update references to the unchanged elements (#223)
  • f39581b Run lifecycle callbacks when only route params change (#221)
  • 45b6d5e Refactor some method names, simplify the code (#219)
  • 032fe09 Update bundle property to accept module and nomodule (#218)
  • c759a62 Prevent suppressing not found route with nested components (#215)
  • ba12cca Remove build-specific Vaadin.Router import from demo snippets (#213)
  • 823e19e Simplify and comment the code that adds / removes outlet content (#216)
  • 8d99e82 Fix the issue when a nested content remains on navigation (#214)
  • 2c3994c Remove UMD bundle from package.json (#208)
  • 5f28a9b Throw exception if children result is not array or object (#210)