Skip to content

Releases: putyourlightson/craft-sprig

3.0.0

08 Apr 13:42
3.0.0
1f27df0
Compare
Choose a tag to compare

{warning} Template caches and static page caches should be cleared after performing this update.

Added

  • Added compatibility with Craft 5.

Changed

  • Changed how the component configuration is encoded.

Removed

  • Removed the sprig.script variable.
  • Removed the s-on attribute.
  • Removed the success variable. Use sprig.isSuccess or sprig.isError instead.
  • Removed the flashes variable. Use sprig.message instead.
  • Removed the id variable. Use sprig.modelId instead.

3.0.0-beta.2

27 Mar 02:49
3.0.0-beta.2
35cb9d0
Compare
Choose a tag to compare
3.0.0-beta.2 Pre-release
Pre-release

Fixed

  • Fixed the site selector dropdown.

Removed

  • Removed the success variable. Use sprig.isSuccess or sprig.isError instead.
  • Removed the flashes variable. Use sprig.message or craft.app.session.flash() instead.
  • Removed the id variable. Use sprig.modelId instead.

2.8.0

27 Mar 03:16
2.8.0
930406d
Compare
Choose a tag to compare

Added

  • Added the sprig.isSuccess variable.
  • Added the sprig.isError variable.
  • Added the sprig.message variable.
  • Added the sprig.modelId variable.

Deprecated

  • Deprecated the success variable. Use sprig.isSuccess or sprig.isError instead.
  • Deprecated the flashes variable. Use sprig.message or craft.app.session.flash() instead.
  • Deprecated the id variable. Use sprig.modelId instead.

3.0.0-beta.1

14 Feb 14:29
3.0.0-beta.1
ebe312c
Compare
Choose a tag to compare
3.0.0-beta.1 Pre-release
Pre-release

{warning} Template caches and static page caches should be cleared after performing this update.

Added

  • Added compatibility with Craft 5.0.0.
  • Added the sprig.isSuccess variable.
  • Added the sprig.isError variable.
  • Added the sprig.message variable.
  • Added the sprig.modelId variable.

Changed

  • Changed how the component configuration is encoded.

Removed

  • Removed the sprig.script variable.
  • Removed the s-on attribute.

Deprecated

  • Deprecated the success variable. Use sprig.isSuccess or sprig.isError instead.
  • Deprecated the flashes variable. Use sprig.message or craft.app.session.flash() instead.
  • Deprecated the id variable. Use sprig.modelId instead.

2.7.3

12 Dec 15:10
2.7.3
850bf29
Compare
Choose a tag to compare

Added

  • Added the ability to pass script tag attributes via the sprig.registerScript() and sprig.setRegisterScript() functions (#338).
  • Added the ComponentsService::setConfig() method.

Changed

2.7.0

11 Nov 09:05
2.7.0
ea36ce1
Compare
Choose a tag to compare

{warning} The htmx script is now automatically injected into the end of the page whenever a Sprig component is created. If you have any JavaScript code in your layouts that rely on htmx being loaded, you will need to wrap them in {% js %} tags as per the docs.

Added

  • Added the Sprig component generator that scaffolds PHP components via a console command (php craft make sprig-component --path sprig/components).
  • Added the s-cache attribute that allows you to specify if and for how long a request should be cached locally in the browser.
  • Added the s-on:* attribute that allows you to respond to events directly on an element.
  • Added the s-disabled-elt attribute that allows you to specify elements that will have the disabled attribute added to them for the duration of the request.
  • Added the sprig.htmxVersion tag.
  • Added the sprig.setAddScript() tag.
  • Added friendly invalid variable exceptions that are shown when the Canary plugin is installed.

Changed

  • The htmx script is now automatically injected into the end of the page whenever a Sprig component is created, meaning that the sprig.script tag is no longer required and can be safely removed.
  • Updated htmx to version 1.9.6 (changelog).
  • Simplified and improved invalid variable error messages.
  • Invalid variable error messages are now only shown when devMode is turned on.

Fixed

  • Fixed the response status code that is sent when required request parameters are not supplied (#325).
  • Fixed a potential security issue.

Deprecated

  • Deprecated the sprig.script tag. It is no longer required and can be safely removed.
  • Deprecated the s-on attribute. Use the s-on:* attribute instead.

2.7.2

29 Sep 16:11
2.7.2
217f2b9
Compare
Choose a tag to compare

Added

Changed

  • Renamed the sprig.setAddScript() function to sprig.setRegisterScript().

2.7.1

27 Sep 07:59
2.7.1
5e1db47
Compare
Choose a tag to compare

Fixed

  • Removed a deprecated tag from the Sprig playground.

2.6.2

01 May 13:01
Compare
Choose a tag to compare

Changed

  • Updated htmx to version 1.9.2 (changelog).
  • Improved autocomplete documentation in the playground.

2.6.1

25 Apr 16:58
Compare
Choose a tag to compare

Fixed

  • Fixed a bug in which the htmx file was not being published even if it did not already exist locally (#305).