Skip to content

Release 6.0.0

Compare
Choose a tag to compare
@lukemelia lukemelia released this 10 Jun 10:46
· 526 commits to master since this release

This major release sports new Octane-friendly API. You can see examples and read about the reasons for the API choices in our API Design doc.

Upgrading from ember-keyboard 5.0.0 to 6.0.0

ember-keyboard 6.0.0-beta.1 introduces new APIs to bring ember-keyboard into the Ember Octane era. The old mixins-based API still works but is deprecated in this release and slated for removal in version 7.

Version 6 requires Ember 3.8 or higher, so if you are on a version of Ember before that, you should stick with 5.0.0 until you are able to upgrade your app's Ember version.

If your app is on a recent version of Ember, you are good to go. The path is to upgrade to ember-keyboard 6.x and you can iteratively update to the new APIs until you have no more deprecation warnings left.

The deprecations page discusses migration paths for each warning you may encounter, but our broader advice is to consider moving as much of your keyboard handling logic to templates as possible. We think that you'll find the on-key helper and modifier to be very convenient to work with. The decorator API (which required ember 3.10 or higher) is closest equivalent to the mixins API, but it should be used sparingly in situations where the template approach isn't a good fit.

There is one other potential breaking change to be aware of when upgrading from v5 to v6: ember-keyboard versions before 6.0 had an ambiguous API when it came to specifying key combos and required the use of code identifiers, like KeyT, Digit1, etc. Be sure to read the docs regarding key vs. code properties and be sure you are specifying the key combo consistent with your intended behavior. You will likely find that you want to update some key combos to the key equivalent. e.g. replace ctrl+KeyT with ctrl+t.

Here's an example of upgrading an Ember app that happens to be open-source: rust-lang/crates.io#2563

Upgrading from ember-keyboard 6.0.0-beta.0 to 6.0.0

The keyboard-press component has been deprecated and replaced with the on-key helper. The on-keyboard and keyboard-shortut modifiers have been deprecated and replaced with the on-key modifier. The deprecations page has more info, along with the 5 to 6 upgrade guide immediately below.

Upgrading from ember-keyboard 6.0.0-beta.1 to 6.0.0

The only changes since 6.0.0-beta.1 were internal dependency updates. Upgrading should be smooth.

🏠 Internal Changes since 6.0.0-beta.1

Committers: 2

Other contributors

Thank you to @optikalefx, @NullVoxPopuli @mattmcmanus, @seanCodes, and @bendemboski for helping to shape the API Design for this release.