Skip to content

Commit 12bc526

Browse files
bexsoftBenjamin Perezdvaldivia
authored
Fixed issue with object browser icons & long names (#389)
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <hola@danielvaldivia.com>
1 parent 32898f0 commit 12bc526

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ListObjects.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const commonIcon = {
5252
backgroundRepeat: "no-repeat",
5353
backgroundPosition: "center center",
5454
width: 16,
55+
minWidth: 16,
5556
height: 40,
5657
marginRight: 10,
5758
};
@@ -90,6 +91,11 @@ const styles = (theme: Theme) =>
9091
display: "flex",
9192
alignItems: "center",
9293
},
94+
fileNameText: {
95+
whiteSpace: "nowrap",
96+
overflow: "hidden",
97+
textOverflow: "ellipsis",
98+
},
9399
iconFolder: {
94100
backgroundImage: "url(/images/ob_folder_clear.svg)",
95101
...commonIcon,
@@ -107,10 +113,10 @@ const styles = (theme: Theme) =>
107113
height: "calc(100vh - 280px)",
108114
},
109115
"@global": {
110-
".rowElementRaw:hover .iconFileElm": {
116+
".rowLine:hover .iconFileElm": {
111117
backgroundImage: "url(/images/ob_file_filled.svg)",
112118
},
113-
".rowElementRaw:hover .iconFolderElm": {
119+
".rowLine:hover .iconFolderElm": {
114120
backgroundImage: "url(/images/ob_folder_filled.svg)",
115121
},
116122
},
@@ -374,7 +380,9 @@ const ListObjects = ({
374380
return (
375381
<div className={classes.fileName}>
376382
<div className={icon} />
377-
<span>{splitItem[splitItem.length - 1]}</span>
383+
<span className={classes.fileNameText}>
384+
{splitItem[splitItem.length - 1]}
385+
</span>
378386
</div>
379387
);
380388
};

portal-ui/src/screens/Console/ObjectBrowser/BrowseBuckets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const styles = (theme: Theme) =>
9090
marginRight: 10,
9191
},
9292
"@global": {
93-
".rowElementRaw:hover .iconBucketElm": {
93+
".rowLine:hover .iconBucketElm": {
9494
backgroundImage: "url(/images/ob_bucket_filled.svg)",
9595
},
9696
},

0 commit comments

Comments
 (0)