Skip to content

Commit 46edda7

Browse files
committed
Merge branch '4.6' into ibx_9060
2 parents b173a02 + 79197e4 commit 46edda7

File tree

53 files changed

+1161
-211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1161
-211
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
cs-fix:
1212
name: Run code style check
13-
runs-on: "ubuntu-22.04"
13+
runs-on: "ubuntu-24.04"
1414
strategy:
1515
matrix:
1616
php:
@@ -35,7 +35,7 @@ jobs:
3535

3636
tests:
3737
name: Tests
38-
runs-on: "ubuntu-22.04"
38+
runs-on: "ubuntu-24.04"
3939
timeout-minutes: 10
4040

4141
strategy:
@@ -88,7 +88,7 @@ jobs:
8888
--health-timeout 5s
8989
--health-retries 5
9090
--tmpfs /var/lib/postgresql/data
91-
runs-on: "ubuntu-22.04"
91+
runs-on: "ubuntu-24.04"
9292
timeout-minutes: 20
9393

9494
strategy:
@@ -142,7 +142,7 @@ jobs:
142142
--health-timeout=5s
143143
--health-retries=5
144144
--tmpfs=/var/lib/mysql
145-
runs-on: "ubuntu-22.04"
145+
runs-on: "ubuntu-24.04"
146146
timeout-minutes: 20
147147

148148
strategy:

.github/workflows/frontend-ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
frontend-test:
1212
name: Frontend build test
13-
runs-on: 'ubuntu-20.04'
13+
runs-on: 'ubuntu-24.04'
1414
timeout-minutes: 5
1515

1616
steps:

features/standard/ContentDraft.feature

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ Feature: Content items creation
3030
And there's draft "TestDraft" on Dashboard list
3131
When I start editing content draft "TestDraft"
3232
And I perform the "Delete draft" action
33-
Then I should be on Content view Page for root
34-
And I open the "Dashboard" page in admin SiteAccess
33+
Then I open the "Dashboard" page in admin SiteAccess
3534
And there's no draft "TestDraft" on Dashboard list
3635

3736
@javascript

phpstan-baseline.neon

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5208,6 +5208,12 @@ parameters:
52085208
count: 1
52095209
path: src/lib/Form/Data/ContentType/Translation/TranslationRemoveData.php
52105210

5211+
-
5212+
message: '#^Property Ibexa\\AdminUi\\Form\\Data\\ContentTypeData\:\:\$isNew in isset\(\) is not nullable nor uninitialized\.$#'
5213+
identifier: isset.initializedProperty
5214+
count: 1
5215+
path: src/lib/Form/Data/ContentTypeData.php
5216+
52115217
-
52125218
message: '#^Method Ibexa\\AdminUi\\Form\\Data\\ContentTypeGroup\\ContentTypeGroupCreateData\:\:setIdentifier\(\) has no return type specified\.$#'
52135219
identifier: missingType.return

src/bundle/Resources/config/services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ imports:
44
- { resource: services/controller_argument_resolvers.yaml }
55
- { resource: services/controllers.yaml }
66
- { resource: services/tabs.yaml }
7+
- { resource: services/action_menu.yaml }
78
- { resource: services/menu.yaml }
89
- { resource: services/pagination.yaml }
910
- { resource: services/ui_config/* }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
services:
2+
_defaults:
3+
autowire: true
4+
autoconfigure: true
5+
public: false
6+
7+
Ibexa\AdminUi\Menu\Action\DraftListActionMenuBuilder:
8+
tags:
9+
- { name: knp_menu.menu_builder, method: build, alias: ibexa.admin_ui.action.draft_list }
10+
11+
Ibexa\AdminUi\Menu\Action\VersionListActionMenuBuilder:
12+
tags:
13+
- { name: knp_menu.menu_builder, method: build, alias: ibexa.admin_ui.action.version_list }
14+
15+
ibexa.adminui.listener.draft_list_action_menu.reorder_by_order_number:
16+
class: Ibexa\AdminUi\Menu\Listener\ReorderByOrderNumberListener
17+
tags:
18+
- { name: kernel.event_listener, event: Ibexa\AdminUi\Menu\Action\DraftListActionMenuBuilder, method: reorderMenuItems, priority: -50 }
19+
20+
ibexa.adminui.listener.version_list_action_menu.reorder_by_order_number:
21+
class: Ibexa\AdminUi\Menu\Listener\ReorderByOrderNumberListener
22+
tags:
23+
- { name: kernel.event_listener, event: Ibexa\AdminUi\Menu\Action\VersionListActionMenuBuilder, method: reorderMenuItems, priority: -50 }

src/bundle/Resources/public/img/ibexa-icons.svg

Lines changed: 38 additions & 1 deletion
Loading
Lines changed: 13 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 7 additions & 0 deletions
Loading

src/bundle/Resources/public/img/icons/mail.svg

100755100644
Lines changed: 5 additions & 3 deletions
Loading

src/bundle/Resources/public/js/scripts/core/suggestion.taggify.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,20 @@ import { getRestInfo } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scri
120120
return;
121121
}
122122

123-
if (this.inputNode.value.length > MIN_QUERY_LENGTH) {
123+
if (this.inputNode.value.length >= MIN_QUERY_LENGTH) {
124124
this.getSuggestions(this.inputNode.value);
125125
}
126126
}
127+
128+
init() {
129+
super.init();
130+
131+
this.inputNode.addEventListener('input', ({ currentTarget }) => {
132+
if (currentTarget.value.length < MIN_QUERY_LENGTH) {
133+
this.hideSuggestionsList();
134+
}
135+
});
136+
}
127137
}
128138

129139
ibexa.addConfig('core.SuggestionTaggify', SuggestionTaggify);

src/bundle/Resources/public/js/scripts/core/taggify.js

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
this.attachEventsToTag = this.attachEventsToTag.bind(this);
1212
this.handleInputKeyUp = this.handleInputKeyUp.bind(this);
13+
this.addElementAttributes = this.addElementAttributes.bind(this);
1314
}
1415

1516
afterTagsUpdate() {}
@@ -18,17 +19,34 @@
1819
return this.acceptKeys.includes(key);
1920
}
2021

21-
addTag(name, value, dataset = {}) {
22+
addElementAttributes(element, attrs) {
23+
const getValue = (value) => (typeof value === 'object' ? JSON.stringify(value) : value);
24+
25+
Object.entries(attrs).forEach(([attrKey, attrValue]) => {
26+
if (attrKey === 'dataset') {
27+
Object.entries(attrValue).forEach(([datasetKey, datasetValue]) => {
28+
element.dataset[datasetKey] = getValue(datasetValue);
29+
});
30+
} else if (element.hasAttribute(attrKey)) {
31+
console.warn(`Element already has the attribute named ${attrKey}`);
32+
} else {
33+
element.setAttribute(attrKey, getValue(attrValue));
34+
}
35+
});
36+
}
37+
38+
addTag(name, value, attrs = {}, tooltipAttrs = {}) {
2239
const tagTemplate = this.listNode.dataset.template;
2340
const renderedTemplate = tagTemplate.replace('{{ name }}', name).replace('{{ value }}', value);
2441
const div = doc.createElement('div');
2542

2643
div.insertAdjacentHTML('beforeend', renderedTemplate);
2744

2845
const tag = div.querySelector('.ibexa-taggify__list-tag');
46+
const tagNameNode = tag.querySelector('.ibexa-taggify__list-tag-name');
2947

30-
Object.entries(dataset).forEach(([datasetKey, datasetValue]) => (tag.dataset[datasetKey] = datasetValue));
31-
48+
this.addElementAttributes(tag, attrs);
49+
this.addElementAttributes(tagNameNode, tooltipAttrs);
3250
this.attachEventsToTag(tag, value);
3351
this.listNode.insertBefore(tag, this.inputNode);
3452
this.tags.add(value);
@@ -37,6 +55,7 @@
3755

3856
removeTag(tag, value) {
3957
this.tags.delete(value);
58+
4059
tag.remove();
4160

4261
this.afterTagsUpdate();
@@ -53,7 +72,7 @@
5372
return;
5473
}
5574

56-
if (this.isAcceptKeyPressed(event.key)) {
75+
if (this.isAcceptKeyPressed(event.key) && this.inputNode.value && !this.tags.has(this.inputNode.value)) {
5776
this.addTag(this.inputNode.value, this.inputNode.value);
5877

5978
this.inputNode.value = '';

src/bundle/Resources/public/js/scripts/details.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
const showMoreIcon = showMoreBtn.querySelector('.ibexa-details__show-more-btn-icon');
55
const showMoreLabel = showMoreBtn.querySelector('.ibexa-details__show-more-label');
66
const showLessLabel = showMoreBtn.querySelector('.ibexa-details__show-less-label');
7+
const ellipsizedLinesNo = getComputedStyle(ellipsizedContent).getPropertyValue('--ibexa-details__ellipsized-lines-no');
78

89
ellipsizedContent.classList.toggle('ibexa-details__item-content--ellipsized');
910

11+
if (ellipsizedLinesNo) {
12+
ellipsizedContent.classList.toggle('ibexa-details__item-content--multi-line-ellipsized');
13+
}
14+
1015
showMoreLabel.classList.toggle('ibexa-details__show-more-label--hidden');
1116
showLessLabel.classList.toggle('ibexa-details__show-less-label--hidden');
1217
showMoreIcon.classList.toggle('ibexa-details__show-more-btn-icon--opened');
@@ -16,7 +21,9 @@
1621
showMoreBtns.forEach((showMoreBtn) => {
1722
const contentWrapper = showMoreBtn.closest('.ibexa-details__item-content-wrapper');
1823
const ellipsizedContent = contentWrapper.querySelector('.ibexa-details__item-content');
19-
const isEllipsized = ellipsizedContent.offsetWidth < ellipsizedContent.scrollWidth;
24+
const isEllipsized =
25+
ellipsizedContent.offsetWidth < ellipsizedContent.scrollWidth ||
26+
ellipsizedContent.offsetHeight < ellipsizedContent.scrollHeight;
2027

2128
showMoreBtn.classList.toggle('ibexa-details__show-more-btn--hidden', !isEllipsized);
2229

src/bundle/Resources/public/js/scripts/fieldType/ezurl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424

2525
if (!isEmpty) {
26-
const isUrlValid = URL.canParse(urlValue);
26+
const isUrlValid = ibexa.errors.urlRegexp.test(urlValue);
2727

2828
if (!isUrlValid) {
2929
result.isError = true;

0 commit comments

Comments
 (0)