Releases: Dogstudio/highway
v2.2.1
v2.2.0
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
- π Add new websites in the Hall of Fame
- π Add Polyfills example to documentation
- β¨ Reduce bundle size significantly with microbundle
- π¨ Update browser support in documentation
- π¨ Update browser support in README.md
- π Fix Slack URL in documentation
- π Fix Slack URL in README.md
v2.1.3
v2.1.2
β‘οΈ 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 theredirect
method ofHighway.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
v2.1.0
- π 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