Skip to content

Commit a6c0b1b

Browse files
committed
Merge branch '5.x' into bugfix/17099-nested-element-edit-btn-and-focus
2 parents e092847 + dab732d commit a6c0b1b

File tree

9 files changed

+18
-13
lines changed

9 files changed

+18
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## Unreleased
44

5-
- Fixed a styling issue. ([#17100](https://github.com/craftcms/cms/pull/17100))
5+
- Fixed a SQL error that could occur when executing an element query, if the `orderBy` param contained unexpected syntax.
6+
- Fixed a bug where nested element cards could be missing their action menus if their “Max” setting had been reached. ([#17103](https://github.com/craftcms/cms/issues/17103))
7+
- Fixed styling issues. ([#17100](https://github.com/craftcms/cms/pull/17100), [#17098](https://github.com/craftcms/cms/issues/17098))
68

79
## 5.7.0 - 2025-04-15
810

@@ -62,7 +64,7 @@
6264
- Double-clicking on entry type chips within entry type select inputs now opens the entry type’s settings in a slideout, rather than its override settings. ([#16838](https://github.com/craftcms/cms/pull/16838))
6365
- Color previews within card attribute designers now show a value from the color palette. ([#16985](https://github.com/craftcms/cms/pull/16985))
6466
- Number previews within card attribute designers now show an in-range value, if the Min Value and Max Value settings are set. ([#16986](https://github.com/craftcms/cms/pull/16986))
65-
- Range previews within card attribute designers new shew an in-range value. ([#16986](https://github.com/craftcms/cms/pull/16986))
67+
- Range previews within card attribute designers now show an in-range value. ([#16986](https://github.com/craftcms/cms/pull/16986))
6668
- Section and entry type names are now linked to their edit pages from entry indexes, for admins.
6769
- Added the `staticStatuses` config setting, for opting into entry statuses being stored statically and only updated on save. ([#17024](https://github.com/craftcms/cms/pull/17024))
6870
- Added the `db/repair` command. ([#16812](https://github.com/craftcms/cms/pull/16812))

src/elements/db/ElementQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3645,7 +3645,7 @@ private function _parseStrForColumnMappings(string $str): string
36453645
return $this->_columnMappingSql($str) ?? $str;
36463646
}
36473647

3648-
return preg_replace_callback('/\[\[(\w+(?:\.\w+)?)]]/', function(array $match) {
3648+
return preg_replace_callback('/(?<!\.)\[\[(\w+(?:\.\w+)?)]]/', function(array $match) {
36493649
$mapping = $this->_columnMappingSql($match[1]);
36503650
if ($mapping === null) {
36513651
return $match[0];

src/helpers/Cp.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,10 +1120,6 @@ function() use ($component, $withEdit): string {
11201120
fn(array $item) => $item['showInChips'] ?? !($item['destructive'] ?? false)
11211121
);
11221122

1123-
if (empty($actionMenuItems)) {
1124-
return '';
1125-
}
1126-
11271123
foreach ($actionMenuItems as $i => &$item) {
11281124
if (str_starts_with($item['id'] ?? '', 'action-edit-')) {
11291125
if (!$withEdit) {
@@ -1139,10 +1135,15 @@ function() use ($component, $withEdit): string {
11391135
return static::disclosureMenu($actionMenuItems, [
11401136
'hiddenLabel' => Craft::t('app', 'Actions'),
11411137
'buttonAttributes' => [
1142-
'class' => ['action-btn', 'small'],
1138+
'class' => array_keys(array_filter([
1139+
'action-btn' => true,
1140+
'small' => true,
1141+
'hidden' => empty($actionMenuItems),
1142+
])),
11431143
'removeClass' => 'menubtn',
11441144
'data' => ['icon' => 'ellipsis'],
11451145
],
1146+
'omitIfEmpty' => false,
11461147
]);
11471148
},
11481149
sprintf('action-menu-%s', mt_rand()),

src/web/assets/cp/dist/cp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/cp/dist/cp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/cp/dist/css/cp.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/cp/dist/css/cp.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/web/assets/cp/src/css/_main.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3444,7 +3444,6 @@ table {
34443444
position: relative;
34453445
border-radius: var(--large-border-radius);
34463446
color: var(--custom-text-color, var(--text-color));
3447-
overflow: hidden; // needed for status indicators
34483447

34493448
--custom-border-color: initial;
34503449
--custom-titlebar-bg-color: initial;
@@ -3471,6 +3470,8 @@ table {
34713470

34723471
.chip,
34733472
.card {
3473+
overflow: hidden; // needed for status indicators
3474+
34743475
&.sel,
34753476
tr.sel &,
34763477
li.sel &,

src/web/assets/cp/src/js/NestedElementManager.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ Craft.NestedElementManager = Garnish.Base.extend(
602602

603603
const actionDisclosure = $element
604604
.find('.action-btn')
605+
.removeClass('hidden')
605606
.disclosureMenu()
606607
.data('disclosureMenu');
607608

0 commit comments

Comments
 (0)