silverstripe-framework/docs/en/04_Changelogs/4.9.0.md
2021-08-16 10:39:41 +12:00

61 lines
3.5 KiB
Markdown

# 4.9.0 (Unreleased)
## Overview
- [Features and enhancements](#features-and-enhancements)
- [Image lazy loading](#image-lazy-loading)
- [Manage your CMS sessions across devices](#session-manager)
- [Other new features](#other-features)
- [Bugfixes](#bugfixes)
## Features and enhancements {#features-and-enhancements}
### Image lazy loading {#image-lazy-loading}
Silverstripe CMS now lazy loads most images by default and includes some options to opt-out of this behaviour.
Image lazy loading defers the loading of images not in the viewport to improve the initial page load performance.
Read more about (image lazy-loading)[https://web.dev/browser-level-image-lazy-loading/].
This feature was implemented in partnership with Google.
Most images will now get the `loading="lazy"` attribute added to them. This includes:
- images added via the HTML Editor's **insert media** button
- image DataObjects added to templates
Image HTML tags (`<img>`) added in templates will not be lazy loaded by default.
To disable lazy loading for an individual image in a template, use `$MyImage.LazyLoad(false)`.
There's some scenarios where you might not want to use the native Silverstripe CMS lazy loading. For example, you might already have a custom lazy loading implementation.
To opt out of lazy loading globally, use the following yml config:
```yml
SilverStripe\Assets\Image:
lazy_loading_enabled: false
```
#### CMS authors
CMS authors can disable lazy loading on images added via the WYSIWYG editor in the "Edit image" panel by setting the new "Loading" field to "Eager".
### Manage your CMS sessions across devices {#session-manager}
The [session manager module](https://github.com/silverstripe/silverstripe-session-manager) is a new security focused feature which allows a CMS user to view and manage their active sessions in the CMS within the "My profile" section of the CMS (/admin/myprofile). They can see the device details behind each session and have the ability to revoke these sessions. This new module has been added to `silverstripe/recipe-cms` which is the recommended method of managing Silverstripe CMS dependencies in a project.
Projects that have `silverstripe/recipe-cms` as a requirement in their `composer.json` will automatically get `silverstripe/session-manager` when you run `composer update`. If your project does not use `silverstripe/recipe-cms`, it's recommended that you require `silverstripe/session-manager` in your composer file as a security enhancement. The session manager module requires no configuration and works out-of-the-box.
If your site has the [symbiote/silverstripe-queuedjobs](https://github.com/symbiote/silverstripe-queuedjobs) module installed, then a job will automatically be created that will periodically remove old database records created by the session manager module.
CMS users can review the [Session Manager user help](https://userhelp.silverstripe.org/en/4/managing_your_website/session_manager/) for more information on managing their sessions.
### Other new features
* [Dot notation support in form fields](https://github.com/silverstripe/silverstripe-framework/pull/9192): Save directly into nested has_one relationships (see [docs](/developer_guides/forms/how_tos/handle_nested_data)).
## Bugfixes {#bugfixes}
This release includes a number of bug fixes to improve a broad range of areas. Check the change logs for full details of these fixes split by module. Thank you to the community members that helped contribute these fixes as part of the release!