Skip to content

Commit 342a48b

Browse files
committed
Add mobile full-screen support for Settings panel
- On mobile (<=980px), Settings panel now renders full-screen - Removes border, shadow, rounded corners, and overlay padding on mobile - Added className prop to ModalOverlay to support per-modal styling
1 parent 3186834 commit 342a48b

3 files changed

Lines changed: 24 additions & 3 deletions

File tree

src/components/AppShell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2452,7 +2452,7 @@ export function AppShell() {
24522452
</ModalOverlay>
24532453
) : null}
24542454
{settingsRoute ? (
2455-
<ModalOverlay aria-label="Settings" onClose={closeSettings} tier="raised">
2455+
<ModalOverlay aria-label="Settings" onClose={closeSettings} tier="raised" className="settings-overlay">
24562456
<div className="library-manager-card settings-panel-wrapper">
24572457
<SettingsPanel initialSection={settingsRoute.section} onClose={closeSettings} />
24582458
</div>

src/components/ModalOverlay.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ type ModalOverlayProps = {
66
children: ReactNode;
77
onClose?: () => void;
88
tier?: "base" | "raised";
9+
className?: string;
910
};
1011

1112
let openModalCount = 0;
1213
const openModalStack: string[] = [];
1314
let modalLayerSeed = 0;
1415

15-
export function ModalOverlay({ children, onClose, tier = "base", ...rest }: ModalOverlayProps) {
16+
export function ModalOverlay({ children, onClose, tier = "base", className, ...rest }: ModalOverlayProps) {
1617
const modalId = useId();
1718
const onCloseRef = useRef(onClose);
1819
onCloseRef.current = onClose;
@@ -54,7 +55,7 @@ export function ModalOverlay({ children, onClose, tier = "base", ...rest }: Moda
5455
return createPortal(
5556
<div
5657
aria-modal="true"
57-
className="library-manager-overlay"
58+
className={["library-manager-overlay", className].filter(Boolean).join(" ")}
5859
onMouseDown={(event) => {
5960
if (!onCloseRef.current) return;
6061
if (event.target !== event.currentTarget) return;

src/index.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4819,6 +4819,26 @@ html.panorama-gesture-lock body {
48194819
.settings-panel-content {
48204820
padding: 16px 16px 36px;
48214821
}
4822+
.settings-panel-wrapper {
4823+
width: 100%;
4824+
height: 100%;
4825+
max-height: none;
4826+
border: none;
4827+
border-radius: 0;
4828+
box-shadow: none;
4829+
padding: 0;
4830+
}
4831+
.settings-overlay {
4832+
padding: 0;
4833+
}
4834+
.settings-overlay .library-manager-card {
4835+
width: 100%;
4836+
height: 100%;
4837+
max-height: none;
4838+
border: none;
4839+
border-radius: 0;
4840+
box-shadow: none;
4841+
}
48224842
}
48234843

48244844
/* Settings nav */

0 commit comments

Comments
 (0)