Skip to content

Commit 9fd19aa

Browse files
committed
cut long folders name to avoid styles issue
1 parent 4930963 commit 9fd19aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@ private function getDirectories(): array
8484
}
8585

8686
$pathArray = explode('/', $path);
87+
$displayName = strlen(end($pathArray)) > 50 ? substr(end($pathArray),0,50)."..." : end($pathArray);
8788
$directories[] = [
88-
'data' => count($pathArray) > 0 ? end($pathArray) : $path,
89+
'data' => count($pathArray) > 0 ? $displayName : $path,
8990
'attr' => ['id' => $path],
9091
'metadata' => [
9192
'path' => $path

0 commit comments

Comments
 (0)