Releases: putyourlightson/craft-sprig
Releases · putyourlightson/craft-sprig
3.0.0
{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. Usesprig.isSuccess
orsprig.isError
instead. - Removed the
flashes
variable. Usesprig.message
instead. - Removed the
id
variable. Usesprig.modelId
instead.
3.0.0-beta.2
Fixed
- Fixed the site selector dropdown.
Removed
- Removed the
success
variable. Usesprig.isSuccess
orsprig.isError
instead. - Removed the
flashes
variable. Usesprig.message
orcraft.app.session.flash()
instead. - Removed the
id
variable. Usesprig.modelId
instead.
2.8.0
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. Usesprig.isSuccess
orsprig.isError
instead. - Deprecated the
flashes
variable. Usesprig.message
orcraft.app.session.flash()
instead. - Deprecated the
id
variable. Usesprig.modelId
instead.
3.0.0-beta.1
{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. Usesprig.isSuccess
orsprig.isError
instead. - Deprecated the
flashes
variable. Usesprig.message
orcraft.app.session.flash()
instead. - Deprecated the
id
variable. Usesprig.modelId
instead.
2.7.3
2.7.0
{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 thes-on:*
attribute instead.
2.7.2
Added
- Added the
sprig.registerScript()
function (#329).
Changed
- Renamed the
sprig.setAddScript()
function tosprig.setRegisterScript()
.
2.7.1
Fixed
- Removed a deprecated tag from the Sprig playground.