Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 73b7d23

Browse files
Fixed some issues with mobile styling, particularly homepage. (#7205)
Homepage was stretching beyond edge of screen on mobile devices. Fixed this so that main contents scroll, while header and social footer are fixed. Editor Projects Page now scrolls on mobile as well. Made Other Audio Settings selector be the row the button is in rather than just the arrow. Co-authored-by: Hanzla Mateen <[email protected]>
1 parent 4322560 commit 73b7d23

File tree

8 files changed

+35
-17
lines changed

8 files changed

+35
-17
lines changed

β€Žpackages/client-core/src/systems/ui/SettingDetailView/index.tsxβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ const SettingDetailView = () => {
169169
}}
170170
/>
171171
</div>
172-
<div className="sectionRow justifySpaceBetween">
172+
<div className="sectionRow justifySpaceBetween" onClick={toggleShowOtherAudioSettings}>
173173
<h4 className="title">{t('user:usermenu.setting.other-audio-setting')}</h4>
174-
<div xr-layer="true" className="showHideButton" onClick={toggleShowOtherAudioSettings}>
174+
<div xr-layer="true" className="showHideButton">
175175
{showAudioDetails ? 'hide details' : 'show details'}
176176
</div>
177177
</div>

β€Žpackages/client-core/src/user/components/UserMenu/index.module.scssβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@
521521
max-height: calc(100vh - 150px);
522522
touch-action: auto;
523523
overflow-y: auto;
524+
max-width: 95%;
525+
margin: auto;
524526

525527
* {
526528
touch-action: auto;

β€Žpackages/client-core/src/user/components/UserMenu/menus/SettingMenu.tsxβ€Ž

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -474,16 +474,14 @@ const SettingMenu = ({ changeActiveMenu, isPopover }: Props): JSX.Element => {
474474
/>
475475
</div>
476476
<section className={styles.settingSection}>
477-
<div className={styles.row}>
477+
<div
478+
className={styles.row}
479+
onClick={() => setOpenOtherAudioSettings(!openOtherAudioSettings)}
480+
onPointerUp={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
481+
onPointerEnter={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
482+
>
478483
<div className={styles.settingHeader}>{t('user:usermenu.setting.other-audio-setting')}</div>
479-
<IconButton
480-
className={styles.collapseBtn}
481-
aria-label="expand"
482-
size="small"
483-
onClick={() => setOpenOtherAudioSettings(!openOtherAudioSettings)}
484-
onPointerUp={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
485-
onPointerEnter={() => AudioEffectPlayer.instance.play(AudioEffectPlayer.SOUNDS.ui)}
486-
>
484+
<IconButton className={styles.collapseBtn} aria-label="expand" size="small">
487485
{openOtherAudioSettings ? <KeyboardArrowUpIcon /> : <KeyboardArrowDownIcon />}
488486
</IconButton>
489487
</div>

β€Žpackages/client/src/pages/index.tsxβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ export const HomePage = (): any => {
8383
top: 0px;
8484
left: 0px;
8585
width: 100%;
86-
min-width: 420px;
8786
transform: none;
8887
pointer-events: auto;
8988
}

β€Žpackages/client/src/pages/room.tsxβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const RoomPage = (): any => {
4646
top: 0px;
4747
left: 0px;
4848
width: 100%;
49-
min-width: 420px;
5049
transform: none;
5150
pointer-events: auto;
5251
}

β€Žpackages/client/src/pages/styles.scssβ€Ž

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,12 @@ body {
283283
}
284284

285285
.lander {
286-
min-height: 100vh;
287-
background-image: linear-gradient(150deg, #00022e, #dbdbdb 100%);
286+
height: 100%;
288287
background-image: linear-gradient(150deg, #00022e, #ff007d4a);
289288
position: relative;
290289
overflow: hidden;
290+
display: flex;
291+
flex-direction: column;
291292

292293
* {
293294
font-family: Inter;
@@ -427,11 +428,11 @@ body {
427428
.main-section {
428429
display: flex;
429430
flex-direction: column;
430-
align-items: center;
431-
justify-content: center;
432431
padding: 5px;
433432
max-width: 1024px;
434433
margin: auto;
434+
width: 100%;
435+
overflow-y: auto;
435436

436437
.desc {
437438
font-size: 30px;
@@ -471,3 +472,16 @@ vite-error-overlay {
471472
.prompt-box-8w {
472473
pointer-events: auto;
473474
}
475+
476+
477+
#root {
478+
height: 100%;
479+
480+
.fullscreen {
481+
height: 100%;
482+
}
483+
484+
#engine-container {
485+
height: 100%;
486+
}
487+
}

β€Žpackages/editor/src/components/projects/ProjectsPage.tsxβ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,10 @@ const ProjectsPage = () => {
420420
#menu-tagData {
421421
z-index: 1500;
422422
}
423+
#engine-container {
424+
display: flex;
425+
flex-direction: column;
426+
}
423427
`}
424428
</style>
425429
<div className={styles.projectPageContainer}>

β€Žpackages/editor/src/components/projects/styles.module.scssβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
display: flex;
5555
background-color: var(--mainBackground);
5656
pointer-events: auto;
57+
max-height: 100%;
5758
}
5859

5960
.projectPageContainer {
@@ -67,6 +68,7 @@
6768
border-radius: 10px;
6869
min-height: calc(100vh - 110px);
6970
max-width: 1280px;
71+
overflow-y: auto;
7072

7173
.projectGridContainer {
7274
display: flex;

0 commit comments

Comments
Β (0)