Skip to content

Commit 523a8c9

Browse files
committed
Add ablility to scroll folders in case when we have a lot of included
one by one folders revert cutting folders from backend
1 parent 773c20c commit 523a8c9

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

app/code/Magento/MediaGalleryUi/Model/Directories/GetFolderTree.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
*/
1818
class GetFolderTree
1919
{
20-
private const NAME_LENGTH = 50;
21-
2220
/**
2321
* @var Filesystem
2422
*/
@@ -86,11 +84,8 @@ private function getDirectories(): array
8684
}
8785

8886
$pathArray = explode('/', $path);
89-
$displayName = strlen(end($pathArray)) > self::NAME_LENGTH ?
90-
substr(end($pathArray), 0, self::NAME_LENGTH) . "..." :
91-
end($pathArray);
9287
$directories[] = [
93-
'data' => count($pathArray) > 0 ? $displayName : $path,
88+
'data' => count($pathArray) > 0 ? end($pathArray) : $path,
9489
'attr' => ['id' => $path],
9590
'metadata' => [
9691
'path' => $path

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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,17 @@
272273
}
273274

274275
.media-directory-container {
276+
&::-webkit-scrollbar {
277+
background: transparent;
278+
width: 0px;
279+
}
280+
-ms-overflow-style: none;
275281
float: left;
282+
max-width: 50%;
283+
overflow-x: scroll;
284+
overflow-y: hidden;
276285
padding-right: 40px;
286+
scrollbar-width: none;
277287
}
278288

279289
.media-gallery-image-block {

0 commit comments

Comments
 (0)