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.
- Added French (fr) translations (thanks to @Jimmylet)
- Improved "copy menu from" functionality logic when dealing with just one menu and/or locale
- Updated packages
- Added "copy menu from" functionality which allows for easier menu duplication
- Updated packages
- Fixed batch updates of MenuItems not triggering observer events
- Updated packages
- Fixed fields not resetting when changing link type
- Updated packages
- Fixed select and static url types throwing an unexpected validation error
- Fixed create/update menu item modal not triggering field updates after validation (thanks to @HeJiaNong)
- Fixed MenuItem using invalid class binding for HasMany relationship definition (thanks to @ExileofAranei)
- Fixed fields not correctly re-rendering after menu item type change (thanks to @ExileofAranei)
- Improved validation error displaying logic
- Updated packages
- Updated packages
- Moved default menu item types into config (thanks to @elerioja)
- Updated packages
When migrating from 5.X to 6.X, you have to add the default menu item types to your config file if you wish to continue to use them.
The config would look like this:
'menu_item_types' => [
\KraenkVisuell\MenuBuilder\MenuItemTypes\MenuItemTextType::class,
\KraenkVisuell\MenuBuilder\MenuItemTypes\MenuItemStaticURLType::class,
// ...
],
- Menu model now has
$fillable
propertiesname
andslug
(thanks to @martin-ro) - Fixed selected value not showing up in
<select>
input (thanks to @mariuskli)
- Added
max_depth
option to config that allows limiting the max depth of menu items
- Fixed
getOptions
order not being respected
- Added Vietnamese translations (thanks to @ttungbmt)
- Added ability to customize
uriKey
in overridden resource using the corestatic uriKey()
function
- Fixed locales callbacks, so
[SomeClass::class, 'getLocales']
should now work as expected (thanks to @raraworks) - Fixed Arabic language translation files (thanks to @omarhen)
- Fixed BaseMenuItemType type definition (thanks to @mgralikowski)
- Updated packages
- Added Arabic translations (thanks to @omarhen)
- Fixed config callbacks, so
Class@method
should now work as expected (thanks to @yuriy-martini) - Consolidated old migrations into one main migration (thanks to @yuriy-martini)
- Updated packages
- Fixed duplication in MySQL
- Fixed duplication in PostgreSQL
- Fixed nesting not working properly still
- Fixed migrations failing in PostgreSQL
- Fixed parent_id not being saved
- Added ability to customize Menu model via config (thanks to @Landish)
- Fixed case where default MenuItem model was used instead of the configured one (thanks to @rdaitan-cp)
- Fixed unique menu slug validator not working on Update
- Fixed some more cases where wrong model was used
- Updated packages
Requires php artisan migrate
for these changes to work`
- Added optional
unique
attribute to menus.'header' => [ 'name' => 'Header', 'unique' => false, // Defaults to true 'menu_item_types' => [] ],
- Fixed
ReworkLocale
migration exception - Updated Navigation icon (thanks to @harmenjanssen)
- Added Dutch translations (thanks to @harmenjanssen)
- Fixed migrations for SQLite (thanks to @bambamboole and @harmenjanssen)
- Fixed issue with Trix field not saving value
- Fixed compatibility with PHP 8 (
getValue
andgetDisplay
functions have new signatures, but this should not cause any problems) - Update packages
- Fixed issue with fields not updating as expected when changing link type
- Fixed issue with fields that return an array
- Update packages
- Dropped PHP 7.1, Laravel 6 and Nova 2 support
- Fixed translations loading
- Added german translations (thanks to @manogi)
- Fixed trailing comma issue with php 7.2.
- Pass
$locale
togetValue
andgetDisplayValue
functions - Fixed passing
$data
togetValue
The new signature for getDisplayValue
is:
public static function getDisplayValue($value = null, array $data = null, $locale)
The new signature for getValue
is:
public static function getValue($value = null, array $data = null, $locale)
- Removed some 1.0 legacy code
- Upgraded nova-translations-loader
- Fixed translations publishing
- Fixed custom fields styles
- Removed helper texts from Multiselect
- Fixed modal overflow styles
- Fixed missing Multiselect styles
- Updated packages
- Fixed PHP 7.4 usage error
- Updated packages
- Fixed migrations in MariaDB (thanks to @allantatter)
- Updated packages
If you want to upgrade from version 2.0 or 3.0, please consult UPGRADING.md for instructions.
- The UI texts are now all translatable and customizable
- Added
menubuilder:type
command to ease the creation of custom types
MenuLinkables
have been replaced with menu types- Locale logic has been reworked - each locale is no longer a separate menu model
- UI has been reworked (lots of visual fixes and improvements)
- JSON parameters field has been removed
- Menu items can now be managed in both Detail and Edit views
- Fixed the error where the "Menus" sidebar item would become inactive when opening the detail or edit view of a menu
nova_get_menu
has been renamed tonova_get_menu_by_slug
- Hugely improved fields validation
- Fixed PHP 7.4
fn
usage - Fixed showing incorrect fields in update modal when changing menu item type
- Fixed nova-multiselect-field not working with new fields functionality
- Fixed updating menu item type
- Fixed custom fields css padding
Major release due to breaking changes!
- Ability to add custom fields to MenuLinkable class (via
getFields(): array
) function (thanks to @KasparRosin) - Ability to customize rules for menu items (via
getRules(): array
) function - Added new
data
column to menu items table (php artisan migrate
required) - Added ability to provide custom
MenuItem
model - Added ability to disable auto-loading of migrations
- Added a fourth parameter
$data
togetDisplayValue()
public static function getDisplayValue($value = null, array $parameters = null, array $data = null)
- Updated packages
- Fix dropdown arrow design issue introduced in Nova 3.7.0
- Fix locale parent deletion (thanks to @KasparRosin)
- Updated packages
- Added optional
$locale
option tonova_get_menu($menuSlug, $locale)
helper function
- Fixed locales not resolving on all field/filter queries
LocaleFilter
fromnova-locale-field
- Updated packages
- Fixed 500 crash when submitting empty "create menu" form
- Fixed issue where some users experienced
parameters
being saved as an empty string instead ofnull
on update
- Fix not being able to create Static URLs
- Support Nova 3.0 in
composer.json
requirements
- Replaced regular
select
input withvue-multiselect
single-select that is searchable
- Fix migration issue with PostgreSQL (thanks to @webbash)
- Fixed issue where some users experienced
parameters
being saved as an empty string instead ofnull
- Improved localization (thanks to @veezex)
- Updated packages
- Pass
$parameters
togetDisplayValue
(thanks to @Ragash)
NB! Breaking.
The new signature for getDisplayValue
is:
public static function getDisplayValue($value = null, array $parameters = null)
- Fix broken SQL (capitalization issues) (thanks to @stryaponoff)
- Update nova-locale-field dependency to 2.0.0
- Duplicate now duplicates the item right below the original instead of putting it at the very end
- Allow menu items of all types to have parameters (thanks to @jordythevulder)
- Fixed invalid capitalization in API routes causing crash on case-sensitive operating systems
- Duplicate functionality
- Complete re-factor of the codebase
- Redesigned UI
- Updated packages
- Fix syntax error (thanks to @PieterxJan)
- Fixed latest migration's rollback not working due to wrong order of dropping foreign keys and indexes
- Added functionality to collapse menu item's children
- Fixed hardcoded column name (thanks to @naska-it)
- Fixed invalid validation rule crashing when updating a menu item
- Added names to migration indexes (uniques and foreign keys)
NB! This release contains breaking changes. See UPGRADING.md for instructions on how to upgrade from 1.0 to 2.0.
- Added support for nova-lang
- Better localization support through
nova-locale-field
- Moved all config options from tool constructor to
config/nova-menu.php
- Updated all packages
- All migrations are now loaded automatically
- Publishing migrations is not necessary anymore
- Running
migrate
will delete the original migration from project source
- Table names are now configurable through
config/nova-menu.php
- Fix modal flickering when data is updated (possibly caused by a Laravel Nova update)
- Fix Menu
slug
unique validation (thanks to @zippoxer)
- Make Nova Resource class configurable (by @ArroWsGM)
- Add templates and config publishing (by @ArroWsGM)
- Enable access control via policy (by @nemrutco)
- Fix MenuLinkable types
BREAKING!
Previous string
enforcements failed in some cases, it is safer to just remove them. New type definitions for getDisplayValue
and getValue
:
public static function getDisplayValue($value = null)
public static function getValue($value = null, array $parameters = null)
- Fix MenuItemBase and MenuItemText function declaration discrepancy by @MohamedLbn
- Order menu items by 'order' value by @kaareloun
- Add
MenuItemText
type for adding menu titles by @kaareloun
- Refactor
MenuItemStaticURL
andMenuLinkable
to useMenuItemBase
base class by @kaareloun - Fix select menus not showing "choose an option" by default
- Code cleanup
- Fix sidebar icon color by @slavarazum
- Add locale as parameter to
getOptions($locale)
method inMenuLinkable
by @slovenianGooner
- Fix MenuBuilderServiceProvider class and file names as reported by @Grafikart
- Fixed missing
MenuItem
names in helper function return values
- Added
nova_get_menu($slug)
helper
- Rename migration tag from @kikoseijo
- Refactor code and update docs
- Improve
nova_get_menus()
helper
- Fix slug-locale composite unique key validation
- Rename tool from menu-builder to nova-menu
- Fixed handling of
parameters
- Managing menus (w/ customizable locales) and menu items
- Nesting and re-ordering of menu-items
- Creation of custom link options (ie links to Laravel models)