github getkirby/kirby 5.3.0-rc.1

pre-release6 hours ago

🎉 Features

  • Support for option icons in checkboxes, multiselect, radio and tags field #7673
    image
    image
    image
  • New <k-code-token> component and global styles for inline <code> elements with data-type attribute. The styles for the colored inline elements have been taken from our lab examples and are now available anywhere. The type can either be a generic type (string, float, bool, etc.) or a color keyword from our design system (green, red, orange, etc.) #7765
    image
  • New <k-stack> component to help with horizontal and vertical layouts. Think of it as a flex layout helper component. It's perfect to create equal gaps between elements in a column or row. E.g. different sections or the gap between the headline and contents of a container. #7766
    image
    You can either use the component as a wrapper (which will create a div):
    <k-stack>
    	<k-box theme="white">Test Box</k-box>
    	<k-box theme="white">Test Box</k-box>
    	<k-box theme="white">Test Box</k-box>
    </k-stack>    
    … or use the k-stack class on an existing wrapper element to inherit the basic stack styles:
    <ul class="k-stack">
    	<li>Item A</li>
    	<li>Item B</li>
    	<li>Item C</li>
    </ul>    
    Use the attributes gap, direction, align and justify to control the layout.
    <k-stack gap="var(--spacing-12)" align="center" direction="row" justify="space-between">
    	<k-box theme="white">Test Box</k-box>
    	<k-box theme="white">Test Box</k-box>
    	<k-box theme="white">Test Box</k-box>
    </k-stack>    
    Those are applied as inline styles. If you use the k-stack class on a custom element, you need to set the inline styles manually or with the CSS rules for your element.
  • New <k-definitions> and <k-definition> components to build definition lists in the style of our tables. This is particularly useful to show any kind of information in a semantic way. We will use this for our new error dialogs. #7767
    image
    <k-definitions>
    	<k-definition term="Term" description="Description" />
    	<k-definition term="Term" description="Description" />
    	<k-definition term="Term" description="Description" />
    </k-definitions>    
    Definition items can also be created with custom slots:
    <k-definitions>
    	<k-definition>
    		<template #term><em>Term</em></template>
    		<p class="k-text">
    			<a href="<https://getkirby.com>">Description</a>
    		</p>
    	</k-definition>
    	<k-definition>
    		<template #term><em>Term</em></template>
    		<p class="k-text">
    			<a href="<https://getkirby.com>">Description</a>
    		</p>
    	</k-definition>
    	<k-definition>
    		<template #term><em>Term</em></template>
    		<p class="k-text">
    			<a href="<https://getkirby.com>">Description</a>
    		</p>
    	</k-definition>
    </k-definitions>    
  • New <k-checklist> component to create appealing lists of items that are marked as checked, to be noticed or errors. We will be using this in our new error dialogs, but the component is also very helpful for all kinds of scenarios in plugins and other parts of the Panel. #7771
    image
    <k-checklist>
    	<li>Item A</li>
    	<li>Item B</li>
    	<li>Item C</li>
    </k-checklist>
    Applying a theme:
    <k-checklist theme="negative">
    	<li>Item A</li>
    	<li>Item B</li>
    	<li>Item C</li>
    </k-checklist>
    All color themes are supported. notice and negative will automatically change the marker (see screenshot) You can easily add your own custom markers as well.
    <k-checklist style="--checklist-marker: '💛'">
    	<li>Item A</li>
    	<li>Item B</li>
    	<li>Item C</li>
    </k-checklist>
  • New Kirby\Http\Url::editor($editor, $file, $line) method, to create local editor URLs to open files in a code editor at the given line. #7768
    <a href="<?= Url::editor('vscode', '/my/local/file.php', 12) ?>">Open in VSCode</a>
  • Preview view: Button to sync scrolling in the compare mode #7813
  • New scroll-to-bottom and scroll-to-bottom-fill icons #7813
  • New LazyCollection class that initializes and loads its data and elements only when they are first needed #7839

⚡Performance

  • Improved performance of UUID enabled check #7094
  • User credentials (main data from index.php) are only loaded once when the user object is first created, improving system performance with many user accounts.
  • Significantly improved performance when large numbers of user accounts are set up #7841

✨ Enhancements

  • $visitor->ip() supports new $hash parameter to retrieve a 50 char long hash of the visitor's IP
  • More readable file paths in JSON error responses for the Panel. Absolute paths to the kirby folder, site folder and index folder will now be replaced with {kirby}, {site} and {index}. This will keep the responses more readable and easier to debug. It will also disguise the filesystem a bit. Although this is not the main intention, since those paths are only visible in debug mode anyway. #7772
  • New layout-top + layout-bottom icons #7814
  • Child classes of Iterator (mostly collections) can now implement a custom iterator and are not pinned to ArrayIterator #7838
  • New User::hasPassword() method to provide a solid check for an existing password #7869
  • The user dropdown now uses "Set password" instead of "Change password" for users that don't have a password so far. #7869
    image
  • Added support for view button separators using (thx @tobimori ) #7873
buttons:
  - open
  - preview
  - '-'
  - languages
  - '-'
  - settings
  • New OfflineError error type in kirby/panel/src/errors/OfflineError.js.
  • kirby/panel/src/panel/request.js now uses safeFetch() and emits offline on network failures.
  • kirby/panel/src/api/request.js uses safeFetch() instead of raw fetch().
  • kirby/panel/src/panel/panel.js catches OfflineError and sets isOffline.
  • Kirby now can handle HTTP range requests for partial content delivery #1207
  • New Filesystem\F::range($file, $offset, $length) method to only read parts of a file
  • New Http\Range class for handling HTTP range requests
  • <k-drawer> has new size prop (options: tiny, small, default, large, huge) #7900
  • <k-tag>: support for icon. #7886
  • <k-checkboxes-input>, <k-radio-input>, <k-toggle-input>: support for additional icon alongside text and info for the label #7886
  • Kirby\Filesystem\F::load() has a new cache parameter which will return the file content from cache or add the loaded file content to a cache on the first time its loaded #7920

🐛 Bug fixes

  • Page move dialog: show spinner while loading https://feedback.getkirby.com/652
  • Fixes broken selection state in textarea buttons if not initialized #7831
  • Iterator::has() and the has() method of collections correctly treats an existing but null value as a valid collection element #7838
  • UUID cache gets populated on model actions (e.g. page creation) #7809
  • Users can now set their first password (if they had none so far) without providing their current one. This only works for their own account. A user without password cannot change the password of any other user. #7869
  • Empty passwords are no longer incorrectly hashed #7869
  • A::get(): Prefer dotted prefix keys to avoid option collisions of full dotted prefix vs. nested array, e.g. with plugin options #6242
  • Radio input: Fixed resetting via clicking the input label #5845
  • Options from query: if the query returns an associative array, Kirby now uses the array keys as values by default #5807
  • Handle offline issues in fetch requests #6077
  • ImageMagick/Imagick: Fixed format conversion #7868
  • Layout field: long layouts collapse while dragging #7668
  • Tables: Fixed index column width for larger numbersk-table: #6451
  • Select field: Fixed double escaping of option text #5995
  • KirbyText: Fixed Smartypants behavior of quotes inside HTML attributes (e.g. (image: ) alt text) #6344
  • Symlinks no longer lead to altered content tokens (which regenerated all media files previously) #7915
  • Properly set the locale when passing no explicit $languageCode to #5230
  • Panel: the header title and buttons stay side by side on larger screens, no matter how long the title is #7643
  • Fixed repeated loading of config files when cloning App object #4286
  • Fixed closing all drawers/dialogs when a nested drawer/dialog got submitted #7903

☠️ Deprecated

  • The following cursor-dependent methods of Iterator and collection classes have been deprecated and will be removed in Kirby 6: key, current, next, prev, rewind and valid #7838
  • Starting in Kirby 6, collection methods can no longer rely on the low-level $collection->data property to be populated. Collection methods should use foreach ($collection) instead of foreach ($collection->data). If direct access to the data array is required, call $collection->initialize() (to initialize all keys) or $collection->hydrate() (to initialize all keys and values). During Kirby 5, collection methods still receive a fully hydrated collection for backwards-compatibility. #7839
  • Kirby\Http\Url::to() has been deprecated. Use Kirby\Cms\Url::to() instead #7811
  • Responder::markVolatileHeader() is deprecated in favor of Responder::volatileHeaders()->mark(). The method will be removed in Kirby 6. #7858

♻️ Refactored

  • Str::template() by default also replaces placeholders wrapped in {< >}. #7885
  • Extract VolatileHeaders logic into own class #7762

🧹 Housekeeping

  • Improve Iterator PHPUnit tests #7838

Don't miss a new kirby release

NewReleases is sending notifications on new releases.