Skip to content

Commit c5f72f2

Browse files
authored
fix: corrected scroll of main component at client mods; feat: improoved ux (#341)
1 parent f12de4e commit c5f72f2

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

src/react/Screen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default ({ title, children, backdrop = true, style, className = '', title
1313
return (
1414
<>
1515
{backdrop === 'dirt' ? <div className='dirt-bg' /> : backdrop ? <div className="backdrop" /> : null}
16-
<div className={`fullscreen ${className}`} style={{ overflow: 'auto', ...style }}>
16+
<div className={`fullscreen ${className}`} style={{ ...style }}>
1717
<div className="screen-content" style={{ ...contentStyle, ...(titleMarginTop === undefined ? {} : { marginTop: titleMarginTop }) }}>
1818
<div className={`screen-title ${titleSelectable ? 'text-select' : ''}`}>{title}</div>
1919
{children}

src/react/mods.module.css

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.root {
2+
min-height: 0;
23
display: flex;
34
flex-direction: column;
45
height: 100%;
@@ -31,29 +32,33 @@
3132
}
3233

3334
.content {
34-
display: flex;
35+
display: grid;
36+
grid-template-columns: 60% 40%;
3537
flex: 1;
3638
gap: 10px;
3739
overflow: hidden;
3840
min-height: 0; /* Important for Firefox */
3941
}
4042

4143
.verticalContent {
42-
flex-direction: column;
44+
display: grid;
45+
grid-template-columns: none;
46+
grid-template-rows: 60% 40%;
47+
overflow: hidden;
4348
}
4449

4550
.verticalContent .modList {
46-
height: 50%;
47-
min-height: 200px;
51+
max-height: 100%;
52+
overflow-y: auto;
4853
}
4954

5055
.verticalContent .sidebar {
51-
height: 50%;
56+
max-height: 100%;
5257
width: 100%;
58+
overflow-y: auto;
5359
}
5460

5561
.modList {
56-
flex: 1;
5762
overflow-y: auto;
5863
display: flex;
5964
flex-direction: column;
@@ -63,18 +68,19 @@
6368
padding: 5px;
6469
min-height: 0; /* Important for Firefox */
6570
height: 100%;
71+
width: 100%;
6672
}
6773

6874
.sidebar {
69-
width: 200px;
75+
overflow-y: auto;
76+
width: 100%;
77+
height: 100%;
7078
display: flex;
7179
flex-direction: column;
7280
gap: 10px;
7381
padding: 10px;
7482
background: rgba(0, 0, 0, 0.3);
7583
border-radius: 4px;
76-
flex-shrink: 0;
77-
height: 100%;
7884
}
7985

8086
.modInfo {

src/screens.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
flex-direction: column;
3434
margin-top: 35px;
3535
/* todo remove it but without it in chrome android the screen is not scrollable */
36-
overflow: auto;
37-
height: fit-content;
36+
/*! upd: changed from "overflow: auto" to "overflow: hidden" to fix main component scroll - delete this comment after testing */
37+
overflow: hidden;
38+
/* height: fit-content; */ /*! delete this line after testing previous line */
3839
/* todo I'm not sure about it */
3940
/* margin-top: calc(100% / 6 - 16px); */
4041
align-items: center;

0 commit comments

Comments
 (0)