Highway Versions Save

Highway - A Modern Javascript Transitions Manager

v2.2.1

4 years ago
  • :lock: Update dependencies for security purposes

v2.2.0

4 years ago

Breaking Changes

Bundle Size & Browser Support

Thanks to @mikehwagz the bundle size has be reduced significantly with microbundle. This improvement removes the polyfills for modern JavaScript features such as the Fetch API, Promises and Maps from Highway in order to have the lightest library. The library now supports the most recent browsers and browser versions. Older ones can be supported by using polyfills out of the box.

A new example, Polyfills, has been added to the documentation to ease the configuration of the required polyfills. The homepage of the documentation has been updated as well to better reflect the browsers supported by the library. So, refer to the documentation to make sure this release doesn't break projects when older browser have to be supported.

Note: The bundle name hasn't changed but more bundles are now available with microbundle. Please open an issue for further problems with this breaking change.

Changelog

  • :tada: Add new websites in the Hall of Fame
  • :tada: Add Polyfills example to documentation
  • :sparkles: Reduce bundle size significantly with microbundle
  • :art: Update browser support in documentation
  • :art: Update browser support in README.md
  • :bug: Fix Slack URL in documentation
  • :bug: Fix Slack URL in README.md

v2.1.3

4 years ago
  • :lock: Update dependencies for security purposes

v2.1.2

5 years ago

⚡️ Parameters Destructuration (Breaking Change)

This is a breaking change about the way parameters are exposed in transitions and events methods. In order to be more flexible for future releases all parameters are now grouped in a single object that can be destructured to only get the informations needed. This means you don't need to bother anymore with the order of the parameters of with parameters you don't need. This also let us add as many entries in the object as we want in the future to expose more informations if needed for those methods without deprecating your code anymore.

Before v2.1.2:

// Events
H.on('NAVIGATE_IN', (to, location) => {});
H.on('NAVIGATE_OUT', (from, location) => {});
H.on('NAVIGATE_END', (from, to, location) => {});

// Transitions
class Transition extends Highway.Transition {
  in(from, to, done) {
    // [...]
  }

  out(from, done) {
    // [...]
  }
}

Now in v2.1.2:

// Events
// Use ES6 Object-Destructuring to filter parameters
H.on('NAVIGATE_IN', ({ to, trigger, location }) => {});
H.on('NAVIGATE_OUT', ({ from, trigger, location }) => {});
H.on('NAVIGATE_END', ({ from, to, trigger, location }) => {});

// Transitions
class Transition extends Highway.Transition {
  in({ from, to, trigger, done }) {
    // [...]
  }

  out({ from, trigger, done }) {
    // [...]
  }
}

🎉 Trigger Informations

This update is about informations on what has triggered the navigation process of Highway. You now have access to those informations inside the parameters of the transitions and events methods with the trigger keyword. This will return either:

  • The DOM Element
  • The popstate string when the back/forward browser's buttons trigger the navigation process
  • The script string when the redirect method of Highway.Core instance is called

Now in V2.1.2:

// Events
H.on('NAVIGATE_IN', ({ to, trigger, location }) => {});
H.on('NAVIGATE_OUT', ({ from, trigger, location }) => {});
H.on('NAVIGATE_END', ({ from, to, trigger, location }) => {});

// Transitions
class Transition extends Highway.Transition {
  in({ from, to, trigger, done }) {
    // [...]
  }

  out({ from, trigger, done }) {
    // [...]
  }
}

For further readings:

v2.1.1

5 years ago

v2.1.0

5 years ago
  • 🎉 Add contextual transitions
  • 🎉 Add overlapping transitions
  • ✨ Improve documentation website
  • ✨ Improve Core.redirect(href, transition) method
  • ✨ Improve Core.attach(links) method
  • ✨ Improve Core.detach(links) method
  • 🎨 Invert from and to parameters of the NAVIGATE_END event

v2.0.8

5 years ago
  • :bug: Fix pushState location in the process
  • :bug: Fix CMD/CTRL + click behavior of browsers

v2.0.7

5 years ago
  • :bug: Fix Issue #29

v2.0.6

5 years ago
  • :bug: Fix undefined entries in cache

v2.0.5

5 years ago
  • :bug: Fix missing cache