Hey everybody. I wanted to share what we have planned for the next release of Stimulus, version 1.1, so folks know where we’re headed in the near future.
Please keep in mind that none of this is set in stone and we don’t have a specific timeline at the moment.
Support for abstract CSS class names. It’s very common for a Stimulus controller to add, remove, or toggle CSS class names on its elements. However, hard-coding those class names in your controller makes it more difficult to reuse. We’ll add a data-class attribute so you can easily map your app- or component-specific CSS classes to abstract names in a controller.
Warning messages for common gotchas. We want to go out of our way to help people write idiomatic Stimulus code, so we’ll add an opt-out warning system that lets you know when you’re using the wrong casing convention or when you reference an unknown identifier.
An integrated test runner. We have a lovely solution for testing Stimulus controllers in our @stimulus/test package, but it’s currently only usable if you’re willing to read the source and set up your own harness. We want to bundle a basic test runner that’s configured for you so there’s no obstacle to writing tests.
An appendix to the Stimulus Handbook with full documentation for naming conventions and descriptor syntax. This information is currently spread out across several chapters in the Handbook. There is also at least one feature that is currently not documented because there was no place for it to go.
Full API documentation provided by TypeDoc. We’ll publish it on the web site, and it will also be available in your favorite editor via our TypeScript .d.ts files.
A public @stimulus/polyfills package for easy IE 11+ support.
Are you using Rails with asset pipeline or webpack?
With asset pipeline you can already do this hello_controller.js.erb will preprocess and any erb tags will work as expected. Including access to helpers. I have not needed to do this recently with webpack though.
I would love to be able to append to the targets declaration array when extending a controller. For example, I have a base Form controller. If I need form-specific conditional logic, I have to redeclare all lof the base Form controllers targets in order to add additional targets for the child class. Not a big deal, but it would be nice.
Hi. I know you specificly say “we don’t have a specific timeline at the moment”… but it’s been 3 months. Just wondering if there’s a timeline for 1.1 anytime soon?
Stimulus 1.1 is just around the corner. Not everything from the original list made the cut, unfortunately.
Support for abstract CSS class names
Warning messages for common gotchas
An integrated test runner
Full API documentation provided by TypeDoc
An appendix to the Stimulus Handbook
A public @stimulus/polyfills package for easy IE 11+ support
The features that didn’t make it are still on the table, and we’ve already made progress on some of them.
A beta release of 1.1 is available now and has no breaking changes. It’s unlikely that anything will change before the final v1.1. We’ve been running the beta in production at Basecamp for several weeks along with Turbolinks 5.2 (released this week).
Here’s a copy of the v1.1.0-beta.1 release notes for convenience:
NEW:@stimulus/polyfills package for legacy browser support (#134, #147, #170)
CHANGED: Applications now start when the DOM is interactive (#131)
CHANGED: Unminified UMD module for easier debugging (#151)
FIXED: Stimulus now accounts for missing mutation notifications from nodes removed by innerHTML assignment in IE 11 (#133) and, in rare cases, when annotating elements synchronously after removing them from an observed tree (#161)
INTERNAL: Upgraded to TypeScript 2.8.1 and Lerna 3.0.0-rc.0