5.0.0-beta.2
Pre-release
Pre-release
bastianallgeier
released this
23 Jan 12:35
·
15 commits
to v5/develop
since this release
Pre-release notes: https://getkirby.com/releases/5
Changelog since 5.0.0-beta.1
✨ Enhancements
- Allow disable all page buttons via
buttons: false
- New way to set the default storage instance for all models #6867
- New
App::storage(ModelWithContent $model)
method - New
storage
component, which can be overwritten in plugins or the app instance setup. - The storage component is now used in all Models to create the default storage instance
// How to create a new default storage instance component: use Kirby\Cms\App; use Kirby\Cms\ModelWithContent; use Kirby\Content\PlainTextStorage; class MyCustomStorageClass extends PlainTextStorage { } // on app initialisation $kirby = new App([ 'components' => [ 'storage' => function (App $kirby, ModelWithContent $model) { return MyCustomStorageClass($model); ] ] ]); // in a plugin App::plugin('my/storage', [ 'components' => [ 'storage' => function (App $kirby, ModelWithContent $model) { return MyCustomStorageClass($model); ] ] ]);
- New
- New
$app->role()
method that works like$app->user()
to return a specific role or the role of the current user. #6874 - View buttons: i18n + query support, component name from key
Panel\Ui\Button
: i18n support fortext
andtitle
propsPanel\Ui\Buttons\ViewButtons
andPanel\Ui\Buttons\ViewButton
have new optional$model
property- Kirby query support in
Panel\Ui\Buttons\ViewButton
forlink
,dialog
,drawer
,icon
,text
,theme
props - Deriving the Vue component name from key:
This first looks up
buttons: - preview retour: text: Retour
k-retour-view-button
and falls back tok-view-button
.
- Writer: nodes with
inline: true
in their button definition are displayed as inline buttons in toolbar (instead inside the dropdown) #6902 - New
this.$helper.object.filter(object, predicate)
. #6902 - Page status button uses custom status labels for
title
#6911 - Plugin update status: passive theme for unknown plugin versions #6920
- System view: Plugin table features two distinct columns for the license type and status #6896
- LicenseStatus supports
link
,dialog
anddrawer
props #6896
🐛 Bug fixes
- Fixed
Str::ucfirst()
behavior, now behaves like PHP default #6834 - Writer field: inline toolbar is hidden when no nodes and marks are available #6804
- Page dropdown: fix disabling preview item #6891
- File preview: fix aspect ratio for medium viewports #6891
- Page section w/ table layout: fix flag column #6866
- Range/Number field: fix
isEmpty()
usage #6898 - Custom writer nodes: fixed active state detection for nodes that include paragraph child nodes #6902
- Permissions are now always correctly determined if the active user changes during the request #6880
🐛 Fixed regressions from Beta.1
- Hide language selector for single language #6850
- Duplicate action is forcing to copy files #6921
- Link in info box is now visible again in dark mode #6906
🚨 Breaking changes
- The
Str::ucfirst()
method no longer lowercases all but the first letter of the text, it only capitalizes the first letter. #6860 - Classes extending
ModelPermissions
need to set their category with theconst CATEGORY
orstatic function category()
instead ofprotected string $category
and use the staticuser()
method instead of$user
and$permissions
properties #6880 <k-item>
: Removeddata-only-option
attributes<k-dialog>
: Removeddata-has-footer
attribute<k-toggles-input>
: Removeddata-disabled
attribute<k-writer-input>
: Removeddata-toolbar-inline
attribute<k-bubble>
: Removeddata-has-text
attribute<k-header>
: Removeddata-has-buttons
attribute<k-tag>
: Removeddata-has-image
anddata-has-toggle
attributes<k-tree>
: Removeddata-has-subtree
attributerequired: true
on checkbox and toggle fields now enforces that these fields need to be checked/toggles (active state)
☠️ Deprecated
panel.favicon
option throws deprecation warnings forurl
option (usehref
instead) and forrel
key (userel
option instead)
♻️ Refactored
ModelPermissions
now also supportsLanguage
objects as quasi models #6876- New
LanguagePermissions
class that inherits the existing logic fromLanguageRules
for consistency with other models #6876 - Globally cache
access
andlist
permissions per permission category, model type and user role to reduce code duplication #6881
♻️ Refactored after Beta.1
- Update preview token logic to reliably fix tokens for the homepage #6856
🧹 Housekeeping
- Move
$app->roles()
method to theAppUsers
trait to increase the overview - Clean up permission-related code for consistency #6879