Skip to content

Commit

Permalink
Merge branch '5.x' into 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Sep 5, 2024
2 parents 7fced54 + c7fe6c5 commit 67f3ed8
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@

## Unreleased

- Fixed a bug where `craft\helpers\StringHelper::lines()` was returning an array of `Stringy\Stringy` objects, rather than strings.
- Fixed styling issues with Template field layout UI elements’ selector labels.

## 5.4.1 - 2024-09-04

- Fixed a bug where element chips within thumbnail views weren’t getting light gray backgrounds. ([#15649](https://github.com/craftcms/cms/issues/15649))
- Fixed a bug where Link fields didn’t fully support inline editing. ([#15653](https://github.com/craftcms/cms/issues/15653))
- Fixed the loading spinner styling on element indexes. ([#15634](https://github.com/craftcms/cms/issues/15634))
- Fixed an error that could occur when saving an element. ([#15656](https://github.com/craftcms/cms/issues/15656))
- Fixed the styling of column sort indicators. ([#15655](https://github.com/craftcms/cms/issues/15655))

## 5.4.0.1 - 2024-09-03

Expand Down
2 changes: 1 addition & 1 deletion packages/craftcms-sass/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ $menuBorderRadius: $mediumBorderRadius;

@if $dir == up {
transform: rotate(225deg);
top: 2px;
inset-block-start: 2px;
} @else if $dir == down {
transform: rotate(45deg);
} @else if $dir == left {
Expand Down
2 changes: 1 addition & 1 deletion src/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
return [
'id' => 'CraftCMS',
'name' => 'Craft CMS',
'version' => '5.4.0.1',
'version' => '5.4.1',
'schemaVersion' => '5.3.0.2',
'minVersionRequired' => '4.5.0',
'basePath' => dirname(__DIR__), // Defines the @app alias
Expand Down
2 changes: 1 addition & 1 deletion src/fieldlayoutelements/BaseUiElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function selectorHtml(): string
Html::endTag('div') . // .fld-element-icon
Html::beginTag('div', ['class' => 'field-name']) .
Html::beginTag('div', ArrayHelper::merge(
['class' => 'fld-element-label'],
['class' => ['fld-element-label']],
$this->selectorLabelAttributes(),
)) .
Html::tag('h4', Html::encode($label)) .
Expand Down
8 changes: 1 addition & 7 deletions src/helpers/StringHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,13 +915,7 @@ public static function lineWrapAfterWord(string $str, int $limit): string
public static function lines(string $str): array
{
$lines = BaseStringy::create($str)->lines();

foreach ($lines as $i => $line) {
$lines[$i] = $line;
}

/** @var string[] $lines */
return $lines;
return array_map(fn(BaseStringy $line) => (string)$line, $lines);
}

/**
Expand Down
7 changes: 6 additions & 1 deletion src/services/Elements.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
use craft\helpers\Db;
use craft\helpers\ElementHelper;
use craft\helpers\Html;
use craft\helpers\Json;
use craft\helpers\Queue;
use craft\helpers\StringHelper;
use craft\helpers\UrlHelper;
Expand Down Expand Up @@ -3739,7 +3740,11 @@ private function _saveElementInternal(

// if we're supposed to save all the content
if ($saveContent || !empty($dirtyFields)) {
$oldContent = $siteSettingsRecord->content; // we'll need that if we're not saving all the content
$oldContent = $siteSettingsRecord->content ?? []; // we'll need that if we're not saving all the content
if (is_string($oldContent)) {
$oldContent = $oldContent !== '' ? Json::decode($oldContent) : [];
}

$content = [];
if ($fieldLayout) {
foreach ($fieldLayout->getCustomFields() as $field) {
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
inset 0 0 0 3px hsl(var(--dark-focus-hsl) / var(--focus-ring-alpha));
--touch-target-size: calc(24rem / 16);
--icon-size: 1rem;
--elements-busy-top-position: calc(50% - var(--size, 20px) / 2);
}

body,
Expand Down Expand Up @@ -2313,7 +2314,8 @@ ul.icons {
width: var(--size, 20px);
height: var(--size, 20px);
inset-block-start: var(--elements-busy-top-position);
inset-inline-start: calc(50% - var(--size, 20px) / 2);
inset-inline-start: var(--elements-busy-top-position);
z-index: 101;
}
}

Expand Down

0 comments on commit 67f3ed8

Please sign in to comment.