All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Custom locale display config options (thanks to @Gertiozuni)
- NB! Removed SEO image field from defaults since deleting media no longer works
- Suggested replacement is nova-media-hub
- Updated packages
Migrating SEO images to nova-media-hub migration example:
Page::all()->each(function ($page) {
$page->seo = collect($page->seo)->map(function ($seoInfo) {
if ($imagePath = $seoInfo['image'] ?? null) {
if (!Storage::disk('public')->exists($imagePath)) {
$seoInfo['image'] = null;
return $seoInfo;
}
$base64File = base64_encode(Storage::disk('public')->get($imagePath));
$media = rescue(fn() => MediaHub::storeMediaFromBase64($base64File, 'public', 'default'), null);
$seoInfo['image'] = $media?->id ?? null;
}
return $seoInfo;
})->toArray();
$page->save();
});
- Fix broken layout with too many locales (thanks to @Gertiozuni)
- Fix Nova::script() and Nova::style() loading (thanks to @matthewjumpsoffbuildings)
- Updated packages
- Improved required rules for page creation and added automatic fill
- Fixed displayUsing not being executed correctly (thanks to @marttinnotta)
- Updated packages
- Added Italian translations (thanks to @trippo)
- Added ->withSeoFields() function to PageManager tool for easier SEO fields override
- Fixed an error on index view when a Template has gone missing (thanks to @kaareloun)
- Fixed DateTime casting error (thanks to @kaareloun)
- Fixed Vapor Image fields (thanks to @ferdiunal)
- Fixed image not deleted from filesystem after removing it from SEO section (thanks to @ndrez-outl1ne)
- Fixed SEO field titles translations (thanks to @RibesAlexandre)
- Fixed rare crash with missing SEO fields
- Fixed
getPagesStructure
error when template for page has been deleted (thanks to @KaarelOun) - Fixed
nova-page-manager.php
config typos (thanks to @marcelosantos89) - Updated dependencies
- Fixed issue where after deleting an image, it was not possible to save the resource due to timestamp update
- Fixed crash regarding the resolving of DateTime fields
- Fixed issue where SEO image would block title and description from saving
- Fixed issue with multiple Flexible fields on the same page
- Removed usages of Arr::map() to support Laravel 8
- Updated packages
- Improved error handling with fields that do not provide .fill()
- Updated packages
- Fixed multiple panels not being filled properly in page/region edit views
- Fixed double-digit array indexes not working with collectAndReplace
- Fixed hardcoded keyName in collectAndReplace
- Fixed a crash with region templates
- Stubs now have fallback to empty array to avoid type error. (thanks to @KaarelOun)
- Fixed double-digit array indexes not working with collectAndReplace
- Fixed hardcoded keyName in collectAndReplace
- Fixed non-unique keys crash in collectAndReplace function (thanks to @KaarelOun)
- Added
->translatable(false)
advanced option for Panels
- Fixed crash with Nova 4.16 and Peekable
- Added the ability to use PageLinkField component without
outl1ne/nova-translatable
.
- Fixed dependsOn support for Nova 4.13 and above
- Bumped minimum Nova version to 4.13
- Updated packages
- Fixed
getPagesStructure
support with postgres.- Previously pages with parent_id were not returned.
This was caused by postgres ordering
null
results differently from mysql.
- Previously pages with parent_id were not returned.
This was caused by postgres ordering
- Hide the whole page fields component with locale button when there's no fields
- Updated packages
- Added
keys
parameter to NPMHelpers::getPageStructure function.
- Rewrote the
NPMHelpers::getPagesStructure
to further optimize query speed and reduce n+1 queries.
- Fixed providing too few arguments to region resolve function.
- Fixed array_map call when page seo fields were null.
- Changed the default order of fields.
- Now matches with the order that was in version >5.0.
Simplifies the transition from version 4.0 => 5.0.
If you prefer the previous layout, you can override the resource class and change the order to your liking.
- Filtering by template for both regions and pages
- Filtering by uniqueness for both regions and pages
- Added regex start and end boundaries for
collectAndReplaceUsing
function - Improved slug field behaviour with different locales
- Added support for downloading image fields
- Fixed an issue with some fields, where only the first value of an array was saved.
- Support providing eloquent Builder instance to
collectAndReplace
function.
- Fixed support for fields that wished to read other fields values.
- Specifically targeted
nova-flexible-content
package where having multiple Flexible fields inside a page would throw an error.
- Specifically targeted
- Fixed page seo image field storing
- Fixed NPMHelpers page formatter not returning name and slug translations
- NB! Previously returned a default translation string for 'name' and 'slug', now it returns an object, ie: (
['en' => 'Name']
)
- NB! Previously returned a default translation string for 'name' and 'slug', now it returns an object, ie: (
- Fixed migrations on Postgres (thanks to @KasparRosin)
- Added
$flat
option toNPMHelpers::getPageStructure
- Improved data replacement error handling
- Fixed data replacement logic
- Added
collectAndReplaceUsing
helper to Template
- Fixed data replacement logic
- Now returns
seo
data from formatPage function.
- Removed SEO fields from regions.
- Added Nova
dependsOn
support - Added advanced DataReplaceHelpers to Template to make resolve()-ing easier
- Fixed issue with flexible content compatibility
- Added
whitecube/nova-flexible-content
support
- Fixed UI panel width problems with latest Nova version
- Fixed invalid type for the
name
column (requires running migrations) - Changed Tailwind prefix from
npm-
too1-
- Updated packages
- Fix mysql query syntax that was breaking with postgres databases.
- Fixed support with
outl1ne/nova-multiselect-field
that was broken in release 5.1.0
-
Added support for Panels inside page template fields
-
Added
fieldPrefix
macro to Panel- Allows you to store panel data in objects.
- ->fieldPrefix('hero') stores data in
data->{locale}->hero->{field_attribute}
- Updated packages
- Improved the query speed of
getPageByPath
helper.
- Fix disabling of resources/models not working
- Fixed instances of missing $params in function declarations
NB! Breaking - Template's resolve() function had its signature changed. It's now:
public function resolve($page, $params): array
{}
- Added $params to Template's resolve function which are filled when using
getPageByPath
(thanks to @kaareloun)
NPMHelpers::getPageByPath()
function (thanks to @kaareloun)
- Fix landing (/) slug handling
- Fixed crash on update when Template has no fields defined
- SEO fields support and configuration options
- Reworked fields filling logic on both the JS and PHP side to support File and Image fields
- Fixed spread operator used on an array with string keys causing an exception on PHP 8.0
- Fixed stub not having correct return types (thanks to @kaareloun)
Major rework for Nova 4.
- Dropped PHP 7.X support
- Dropped Nova 3.X support
- Reworked localization logic
- Renamed namespace from OptimistDigital to Outl1ne