Skip to content

5.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@bastianallgeier bastianallgeier released this 23 Jan 12:35
· 15 commits to v5/develop since this release
f2ee5cf

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 $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 for text and title props
    • Panel\Ui\Buttons\ViewButtons and Panel\Ui\Buttons\ViewButton have new optional $model property
    • Kirby query support in Panel\Ui\Buttons\ViewButton for link, dialog, drawer, icon, text, theme props
    • Deriving the Vue component name from key:
      buttons:
        - preview
        retour:
          text: Retour
      This first looks up k-retour-view-button and falls back to k-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 and drawer 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 the const CATEGORY or static function category() instead of protected string $category and use the static user() method instead of $user and $permissions properties #6880
  • <k-item>: Removed data-only-option attributes
  • <k-dialog>: Removed data-has-footer attribute
  • <k-toggles-input>: Removed data-disabled attribute
  • <k-writer-input>: Removed data-toolbar-inline attribute
  • <k-bubble>: Removed data-has-text attribute
  • <k-header>: Removed data-has-buttons attribute
  • <k-tag>: Removed data-has-image and data-has-toggle attributes
  • <k-tree>: Removed data-has-subtree attribute
  • required: 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 for url option (use href instead) and for rel key (use reloption instead)

♻️ Refactored

  • ModelPermissions now also supports Language objects as quasi models #6876
  • New LanguagePermissions class that inherits the existing logic from LanguageRules for consistency with other models #6876
  • Globally cache access and list 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 the AppUsers trait to increase the overview
  • Clean up permission-related code for consistency #6879