This will enable the ability to override data attribute config values on the JavaScript side.
This can be useful for per-instance overrides derived from other frontend code, and saves developers having to override data attributes using JavaScript.
- The Snowboard and PluginLoader objects are now frozen and cannot be modified.
- Added a Proxy in front of Snowboard to handle plugin loading
- Plugin "Snowboard" instances are blocked from running certain methods
- Update tests to check hardening
Fixes an issue where the imageWidth constraints were smaller than the field itself which would cause the entire field to shrink in size instead of just the image itself. Fixes#684
As per documenation, key names must start with a # or .
However there was no validation to this, which in turns translating to elements unexpectedly being replaced by random keys. One such example is title replacing the page <title>. You could test for example with a div key and see everything fall on itself :)
The way this was discovered was by using the Crop and Insert functionality which upon inserting the image replaces the page title with the name of the file inserted.
The PR is making changes to 2 systems, the old one which is used by the above and also the Snowboard system which I have learnt to be the new way.
- Deprecate "runPluginRefreshCommand" method and replace with "instantiatePlugin", to better describe the functionality within.
- Use namespace to guess plugin being detected, falling back to path if there is no namespace given - this fixes testing for symlinked plugins.
- Add type hints and return types for most methods
Very useful for projects using mix for their own plugins that would like to avoid running any mix packages provided by either the Winter core or other plugins that the project owner doesn't control.
Includes handling of Windows interrupt/break signals in Powershell to correctly cleanup when terminating the Mix commands early.
Co-authored-by: Ben Thomson <git@alfreido.com>
Adds the following methods to the UploadableWidget trait to make it more portable / configurable.
- uploadableGetDisk()
- uploadableGetUploadPath()
- uploadableGetUploadUrl()
This caused an issue with taglists where existing relation values were being converted into their IDs instead of the actual nameFrom value.
If Post belongsToMany Authors and the following configuration is used:
```yaml
authors:
label: Authors
type: taglist
mode: relation
separator: comma
customTags: true
nameFrom: full_name
```
Then loading a form with the authors relation already set would cause the ID of the authors to be displayed in the field instead of the full name and would cause issues when attempting to save the form.