Skip to content

Commit 4aa3f40

Browse files
authored
Removed permanent scrollbar in embedded object browser (#2237)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 3f41a82 commit 4aa3f40

File tree

4 files changed

+29
-6
lines changed

4 files changed

+29
-6
lines changed

portal-ui/src/icons/LoginMinIOLogo.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const LoginMinIOLogo = (props: SVGProps<SVGSVGElement>) => (
2929
<path
3030
d="M10822.423,3589.089c0-14.873,14.033-24.285,33.612-24.285s33.7,9.328,33.7,24.285-13.782,24.282-33.7,24.282C10836.374,3613.371,10822.423,3604.046,10822.423,3589.089Zm7.731,0c0,11.763,11.263,18.065,25.881,18.065s25.966-6.3,25.966-18.065c0-11.681-11.345-18.068-25.966-18.068S10830.154,3577.408,10830.154,3589.089Zm-43.43,23.094-41.918-22.23a1.586,1.586,0,0,0-2.329,1.4v21.011H10726.5v-42.123a4.421,4.421,0,0,1,4.42-4.422h.029a4.4,4.4,0,0,1,2.077.519l41.752,22.233a1.587,1.587,0,0,0,2.334-1.4v-21.35h16.11v42.454a4.42,4.42,0,0,1-6.493,3.905Zm-88.75.186v-46.534h15.884v46.534Zm-28.218,0v-20.147a1.588,1.588,0,0,0-2.392-1.367l-19.068,11.186a5.668,5.668,0,0,1-5.818-.055l-18.07-11.057a1.589,1.589,0,0,0-2.416,1.355v20.084h-15.876v-42.323a4.423,4.423,0,0,1,4.423-4.422h.038a4.453,4.453,0,0,1,2.3.648l32.246,19.694a1.429,1.429,0,0,0,1.5,0l32.243-19.694a4.453,4.453,0,0,1,2.3-.648h.041a4.421,4.421,0,0,1,4.42,4.422v42.323Zm136.353-.011v-46.534h7.39v46.534Z"
3131
transform="translate(-10606.116 -3564.803)"
32-
stroke="rgba(0,0,0,0)"
3332
strokeWidth="1"
3433
/>
3534
</g>

portal-ui/src/screens/Console/Buckets/BucketDetails/BrowserHandler.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,12 @@ const BrowserHandler = () => {
151151
>
152152
<Grid>
153153
<LoginMinIOLogo
154-
style={{ width: 105, marginRight: 30, marginTop: 10 }}
154+
style={{
155+
width: 105,
156+
marginRight: 30,
157+
marginTop: 10,
158+
fill: "#081C42",
159+
}}
155160
/>
156161
</Grid>
157162
<Grid item xs>

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ const styles = (theme: Theme) =>
7575
bucketList: {
7676
marginTop: 25,
7777
height: "calc(100vh - 210px)",
78+
"&.isEmbedded": {
79+
height: "calc(100vh - 128px)",
80+
},
7881
},
7982
searchField: {
8083
...searchField.searchField,
@@ -221,7 +224,12 @@ const ListBuckets = ({ classes }: IListBucketsProps) => {
221224
{obOnly && (
222225
<Grid item xs>
223226
<LoginMinIOLogo
224-
style={{ width: 105, marginRight: 15, marginTop: 10 }}
227+
style={{
228+
width: 105,
229+
marginRight: 15,
230+
marginTop: 10,
231+
fill: "#081C42",
232+
}}
225233
/>
226234
</Grid>
227235
)}
@@ -325,7 +333,11 @@ const ListBuckets = ({ classes }: IListBucketsProps) => {
325333

326334
{loading && <LinearProgress />}
327335
{!loading && (
328-
<Grid item xs={12} className={classes.bucketList}>
336+
<Grid
337+
item
338+
xs={12}
339+
className={`${classes.bucketList} ${obOnly ? "isEmbedded" : ""}`}
340+
>
329341
{filteredRecords.length !== 0 && (
330342
<VirtualizedList
331343
rowRenderFunction={renderItemLine}

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ import {
127127
setBucketInfo,
128128
} from "../../../BucketDetails/bucketDetailsSlice";
129129
import RenameLongFileName from "../../../../ObjectBrowser/RenameLongFilename";
130+
import { selFeatures } from "../../../../consoleSlice";
130131

131132
const HistoryIcon = React.lazy(
132133
() => import("../../../../../../icons/HistoryIcon")
@@ -155,6 +156,9 @@ const useStyles = makeStyles((theme: Theme) =>
155156
browsePaper: {
156157
border: 0,
157158
height: "calc(100vh - 210px)",
159+
"&.isEmbedded": {
160+
height: "calc(100vh - 315px)",
161+
},
158162
"&.actionsPanelOpen": {
159163
minHeight: "100%",
160164
},
@@ -315,6 +319,9 @@ const ListObjects = () => {
315319
(state: AppState) => state.console.session.allowResources
316320
);
317321

322+
const features = useSelector(selFeatures);
323+
const obOnly = !!features?.includes("object-browser-only");
324+
318325
const [records, setRecords] = useState<BucketObjectItem[]>([]);
319326
const [deleteMultipleOpen, setDeleteMultipleOpen] = useState<boolean>(false);
320327
const [loadingStartTime, setLoadingStartTime] = useState<number>(0);
@@ -1539,8 +1546,8 @@ const ListObjects = () => {
15391546
idField="name"
15401547
records={payload}
15411548
customPaperHeight={`${classes.browsePaper} ${
1542-
detailsOpen ? "actionsPanelOpen" : ""
1543-
}`}
1549+
obOnly ? "isEmbedded" : ""
1550+
} ${detailsOpen ? "actionsPanelOpen" : ""}`}
15441551
selectedItems={selectedObjects}
15451552
onSelect={selectListObjects}
15461553
customEmptyMessage={`This location is empty${

0 commit comments

Comments
 (0)