Skip to content

Commit d645c92

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop
Accepted Community Pull Requests: - #29633: FIx text and images are displayed cropped if folder has long name && Filters isn`t applied on the "Category" (by @Nazar65) - #29684: Correctly revert default mode after mass image deletion (by @Nazar65) Fixed GitHub Issues: - #1763: Missing Call to `$procede()` (reported by @astorm) has been fixed in #29633 by @Nazar65 in 2.4-develop branch Related commits: 1. 9fd19aa 2. 084f689 3. 363a100 4. 702d201 5. 58b7d3b 6. 3757078 7. a246993 8. 773c20c 9. 523a8c9 10. c7d50bb 11. 18e7988 12. 8c0e991 13. 9a2880d 14. 141434f 15. 22e613c 16. 338f510 17. a572253 18. 51188d9 - #1769: Update UI so modal doesn't show when cache clear is needed (reported by @markoshust) has been fixed in #29684 by @Nazar65 in 2.4-develop branch Related commits: 1. 4e11232 2. f648b8b 3. fe78100
2 parents 8f39516 + 15a1faa commit d645c92

File tree

8 files changed

+58
-22
lines changed

8 files changed

+58
-22
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductGridUrlFilterApplierTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
3232
</after>
3333

34-
<amOnPage url="{{AdminProductIndexPage.url}}?filters[name]=$createSimpleProduct.name$" stepKey="navigateToProductGridWithFilters"/>
34+
<amOnPage url="{{AdminProductIndexPage.url}}?filters[sku]=$createSimpleProduct.sku$" stepKey="navigateToProductGridWithFilters"/>
3535
<waitForPageLoad stepKey="waitForProductGrid"/>
3636
<see selector="{{AdminProductGridSection.productGridNameProduct($createSimpleProduct.name$)}}" userInput="$createSimpleProduct.name$" stepKey="seeProduct"/>
3737
<waitForElementVisible selector="{{AdminProductGridFilterSection.enabledFilters}}" stepKey="waitForEnabledFilters"/>
3838
<seeElement selector="{{AdminProductGridFilterSection.enabledFilters}}" stepKey="seeEnabledFilters"/>
39-
<see selector="{{AdminProductGridFilterSection.enabledFilters}}" userInput="Name: $createSimpleProduct.name$" stepKey="seeProductNameFilter"/>
39+
<see selector="{{AdminProductGridFilterSection.enabledFilters}}" userInput="SKU: $createSimpleProduct.sku$" stepKey="seeProductNameFilter"/>
4040
</test>
4141
</tests>

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,16 @@
6060
<actionGroup ref="AdminMediaGalleryAssertCategoryNameInCategoryGridActionGroup" stepKey="assertCategoryInGrid">
6161
<argument name="categoryName" value="$$category.name$$"/>
6262
</actionGroup>
63+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/>
64+
<actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openCategoryPageToVerifyIfFilterCanBeApplied"/>
65+
<actionGroup ref="AdminEnhancedMediaGalleryCategoryGridExpandFilterActionGroup" stepKey="expandFilters"/>
66+
<actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setAssetFilter">
67+
<argument name="filterName" value="Asset"/>
68+
<argument name="optionName" value="{{UpdatedImageDetails.title}}"/>
69+
</actionGroup>
70+
<actionGroup ref="AdminEnhancedMediaGalleryCategoryGridApplyFiltersActionGroup" stepKey="applyFilters"/>
71+
<actionGroup ref="AssertAdminMediaGalleryAssetFilterPlaceHolderActionGroup" stepKey="assertFilterAppliedAfterUrlFilterApplier">
72+
<argument name="filterPlaceholder" value="{{UpdatedImageDetails.title}}"/>
73+
</actionGroup>
6374
</test>
6475
</tests>

app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryAssertMassActionModeNotActiveActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<annotations>
1313
<description>Asserts that massaction mode is terminated</description>
1414
</annotations>
15-
1615

16+
<dontSeeElement selector="{{AdminMediaGalleryHeaderButtonsSection.addSelected}}" stepKey="verifyAddSelectedButtonNotVisible"/>
1717
<dontSeeElement selector="{{AdminEnhancedMediaGalleryMassActionSection.totalSelected}}" stepKey="verifyTeminateMassAction"/>
1818
</actionGroup>
1919
</actionGroups>

app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryDeleteImagesInBulkTest.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919
<group value="media_gallery_ui"/>
2020
</annotations>
2121
<before>
22+
<createData entity="SimpleSubCategory" stepKey="category"/>
2223
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
24+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/>
25+
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory">
26+
<argument name="category" value="$$category$$"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromWysiwyg"/>
2429
</before>
30+
<after>
31+
<deleteData createDataKey="category" stepKey="deleteCategory"/>
32+
</after>
2533
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
2634
<argument name="image" value="ImageUpload"/>
2735
</actionGroup>
@@ -34,7 +42,7 @@
3442
<argument name="imageName" value="{{ImageUpload.fileName}}"/>
3543
</actionGroup>
3644
<actionGroup ref="AdminEnhancedMediaGalleryDisableMassactionModeActionGroup" stepKey="disableMassActionMode"/>
37-
45+
3846
<actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/>
3947
<actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete">
4048
<argument name="imageName" value="{{ImageUpload.fileName}}"/>

app/code/Magento/MediaGalleryUi/view/adminhtml/web/css/source/_module.less

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@color-media-gallery-buttons-border: #adadad;
1919
@color-media-gallery-buttons-text: #514943;
2020
@color-media-gallery-checkbox-background: #eee;
21-
21+
@color-media-gallery-scrollbar-background: #fff;
2222
& when (@media-common = true) {
2323

2424
.media-gallery-delete-image-action,
@@ -170,8 +170,9 @@
170170
height: 30px;
171171
margin: 1px;
172172
padding-left: 6px;
173+
padding-right: 10px;
173174
padding-top: 6px;
174-
width: 100%;
175+
width: max-content;
175176
}
176177

177178
.jstree-default .jstree-clicked {
@@ -272,8 +273,18 @@
272273
}
273274

274275
.media-directory-container {
276+
&::-webkit-scrollbar {
277+
background-color: @color-media-gallery-scrollbar-background;
278+
}
279+
&::-webkit-scrollbar-thumb {
280+
background-color: @color-masonry-grey;
281+
}
275282
float: left;
283+
max-width: 50%;
284+
overflow-x: scroll;
285+
overflow-y: hidden;
276286
padding-right: 40px;
287+
scrollbar-color: @color-masonry-grey @color-media-gallery-scrollbar-background;
277288
}
278289

279290
.media-gallery-image-block {

app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/massaction/massactions.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,8 @@ define([
141141
if (response.status === 'canceled') {
142142
return;
143143
}
144-
this.imageModel().selected({});
145-
this.massActionMode(false);
146-
this.switchMode();
147-
}.bind(this));
144+
$(window).trigger('terminateMassAction.MediaGallery');
145+
});
148146
}
149147
}.bind(this));
150148
}

app/code/Magento/Ui/view/base/web/js/grid/url-filter-applier.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
define([
77
'uiComponent',
8-
'underscore'
9-
], function (Component, _) {
8+
'underscore',
9+
'jquery'
10+
], function (Component, _, $) {
1011
'use strict';
1112

1213
return Component.extend({
@@ -36,7 +37,9 @@ define([
3637
* Apply filter
3738
*/
3839
apply: function () {
39-
var urlFilter = this.getFilterParam(this.searchString);
40+
var urlFilter = this.getFilterParam(this.searchString),
41+
applied,
42+
filters;
4043

4144
if (_.isUndefined(this.filterComponent())) {
4245
setTimeout(function () {
@@ -47,8 +50,9 @@ define([
4750
}
4851

4952
if (Object.keys(urlFilter).length) {
50-
this.filterComponent().setData(urlFilter, false);
51-
this.filterComponent().apply();
53+
applied = this.filterComponent().get('applied');
54+
filters = $.extend({}, applied, urlFilter);
55+
this.filterComponent().set('applied', filters);
5256
}
5357
},
5458

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/url-filter-applier.test.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ define([
1212
describe('Magento_Ui/js/grid/url-filter-applier', function () {
1313
var urlFilterApplierObj,
1414
filterComponentMock = {
15-
setData: jasmine.createSpy(),
15+
set: jasmine.createSpy(),
16+
get: jasmine.createSpy(),
1617
apply: jasmine.createSpy()
1718
};
1819

@@ -64,11 +65,14 @@ define([
6465
it('applies url filter on filter component', function () {
6566
urlFilterApplierObj.searchString = '?filters[name]=test&filters[qty]=1';
6667
urlFilterApplierObj.apply();
67-
expect(urlFilterApplierObj.filterComponent().setData).toHaveBeenCalledWith({
68-
'name': 'test',
69-
'qty': '1'
70-
}, false);
71-
expect(urlFilterApplierObj.filterComponent().apply).toHaveBeenCalled();
68+
expect(urlFilterApplierObj.filterComponent().get).toHaveBeenCalled();
69+
expect(urlFilterApplierObj.filterComponent().set).toHaveBeenCalledWith(
70+
'applied',
71+
{
72+
'name': 'test',
73+
'qty': '1'
74+
}
75+
);
7276
});
7377
});
7478
});

0 commit comments

Comments
 (0)