stimulus

A modest JavaScript framework for the HTML you already have

MIT License

Downloads
1.7M
Stars
12.7K
Committers
89

Bot releases are hidden (Show)

stimulus - v3.2.2 Latest Release

Published by dhh about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.2.1...v3.2.2

stimulus - v3.2.1

Published by dhh almost 2 years ago

What's Changed

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.2.0...v3.2.1

stimulus - v3.2.0

Published by dhh almost 2 years ago

What's Changed

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.1.1...v3.2.0

stimulus - v3.1.1

Published by dhh almost 2 years ago

What's Changed

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.1.0...v3.1.1

stimulus - v3.1.0

Published by dhh over 2 years ago

What's Changed

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.0.1...v3.1.0

stimulus - v3.0.1

Published by dhh about 3 years ago

What's Changed

Full Changelog: https://github.com/hotwired/stimulus/compare/v3.0.0...v3.0.1

stimulus - v3.0.0

Published by dhh about 3 years ago

Release announcement πŸš€πŸŽ‰

stimulus - v3.0.0-rc.1

Published by dhh about 3 years ago

  • ADDED: Static shouldLoad function can be used to prevent a controller from registering based on environmental circumstances [#448]
  • REMOVED: Warnings were not working in a number of common instances, so will need to wait for 3.1.
  • REMOVED: Color highlighting for debug mode had problems with dark mode and accessibility.
stimulus - v3.0.0-beta.2

Published by dhh about 3 years ago

  • FIXED: New dispatch function wasn't in the right scope [70c98dedfe8ce6c12ead42fadd73c056ffbbe1dc]
  • REMOVED: webpacker-helpers and definitionsFromContext [#444]

Instead of webpack-helpers, use either stimulus-rails with import maps or the new rake task + generator to keep a manifest up to date (or maintain a manifest by hand).

stimulus - v3.0.0-beta.1

Published by dhh about 3 years ago

  • NEW: Pass action method params [#249]
  • NEW: Fire callbacks when targets are added or removed [#367]
  • NEW: Declare custom default values [#350]
  • NEW: Add [key]Classes method to better handle multiple CSS classes [#344]
  • NEW: Introduce a Debug mode [#354]
  • NEW: Emit warnings for undefined controllers, actions and targets [#413]
  • NEW: Add a convenience method for dispatching DOM events inside a controller [#302]

Stimulus is moving package location on npm from stimulus to @hotwired/stimulus. The new package is an all-in-one, so no more individual packages for core, multi map, mutation-observers, etc.

Stimulus 3 will no longer support IE11. Our compile target is now ES6+.

Note: This release was built from the branch single-package, which will be merged to main as soon as a few issues regarding tests and examples are resolved. But that has no impact on the use of this beta release.

Rails users: You can use this release via stimulus-rails 0.3.10 with the new importmap-rails approach.

stimulus -

Published by sstephenson almost 4 years ago

If you're upgrading from a previous version of Stimulus, note that the syntax for target attributes has changed to move the controller identifier into the attribute's name. The new format is data-[identifier]-target="[name]" instead of data-target="[identifier].[name]". You can still use the old syntax, but you will see a warning in the console, and support will be removed in a future version.

The data map API from Stimulus 1.0 will continue to work but is no longer documented and should be considered internal. We suggest migrating to the new values API.

stimulus -

Published by sstephenson almost 6 years ago

  • CHANGED: Various documentation improvements (#190, #193, #206)
  • FIXED: Type declarations for webpack helpers in the stimulus package (#214)
  • FIXED: Pin @stimulus/polyfills dependencies to work around upstream changes (0251c87795f351a7462d00fa0f028b2daf967a01)
stimulus -

Published by sstephenson about 6 years ago

  • NEW: Stimulus Reference documentation
  • NEW: Ordered actions (#149)
  • 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
  • INTERNAL: New build system (#155)
stimulus -

Published by sstephenson about 6 years ago

  • NEW: Ordered actions (#149)
  • 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
  • INTERNAL: New build system (#155)
stimulus -

Published by javan over 6 years ago

stimulus -

Published by javan over 6 years ago

  • NEW: Linked target properties (https://github.com/stimulusjs/stimulus/pull/61, https://github.com/stimulusjs/stimulus/pull/68)

    Define a controller's target names and Stimulus automatically creates properties for accessing them:

    export default class extends Controller {
      static targets = [ "source" ]
    
      initialize() {
        this.sourceTarget    // Element
        this.sourceTargets   // Element[]
        this.hasSourceTarget // boolean
      }
    }
    
  • NEW: Configurable error handler (https://github.com/stimulusjs/stimulus/pull/53)

    const application = Application.start()
    
    application.handleError = (error, message, detail) => {
      console.warn(message, detail)
      Raven.captureException(error)
    }
    
  • NEW: Namespaced identifiers (https://github.com/stimulusjs/stimulus/pull/65)

    If your controller file is named… its identifier will be…
    list_item_controller.js list-item
    users/list_item_controller.js users--list-item
  • CHANGED: Controller autoloading with webpack (https://github.com/stimulusjs/stimulus/pull/46)

    A new definitionsFromContext helper replaces the old autoload helper:

    const application = Application.start()
    -const context = require.context("./controllers", true, /\.js$/)
    -autoload(context, application)
    +const context = require.context("./controllers", true, /\.js$/)
    +application.load(definitionsFromContext(context))
    
  • REMOVED: Action method event target argument (https://github.com/stimulusjs/stimulus/pull/55)

    Previously, action methods were invoked with two arguments: event, eventTarget. Now, only the event is passed:

    -greet(event, eventTarget) {
    -  console.log(event, eventTarget)
    +greet(event) {
    +  console.log(event, event.target)
     }
    
  • REMOVED: Controller#{add,remove}Action (https://github.com/stimulusjs/stimulus/pull/50)

    Noted for posterity since these methods were undocumented.

stimulus -

Published by javan over 6 years ago

Initial public release