Fix updates dialog on Android by portaling above Settings and resolving Capacitor asset URLs.
Trigger cinny-mobile / dispatch (push) Successful in 2s

This commit is contained in:
2026-08-23 08:19:51 +10:00
parent e65a516350
commit a20c871726
5 changed files with 39 additions and 19 deletions
@@ -3,7 +3,13 @@ import { color, config, toRem } from 'folds';
const MOBILE_BREAKPOINT = '480px';
/** Dialog height cap — 85% of the viewport, minus safe areas. */
export const PortalLayer = style({
position: 'fixed',
inset: 0,
zIndex: config.zIndex.Max,
});
/** Dialog + overlay padding must never exceed the viewport height. */
const DIALOG_MAX_HEIGHT =
'calc(85vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))';
@@ -1,8 +1,10 @@
import React, { useState } from 'react';
import { createPortal } from 'react-dom';
import FocusTrap from 'focus-trap-react';
import {
Box,
Button,
config,
Dialog,
IconButton,
Overlay,
@@ -46,18 +48,19 @@ export function UpdatesDialog({
setShowOlderList(false);
};
return (
<Overlay open backdrop={<OverlayBackdrop />}>
<OverlayCenter className={css.OverlayFrame}>
<FocusTrap
focusTrapOptions={{
initialFocus: false,
onDeactivate: onClose,
clickOutsideDeactivates: true,
escapeDeactivates: stopPropagation,
}}
>
<Dialog variant="Surface" className={css.DialogShell}>
return createPortal(
<div className={css.PortalLayer}>
<Overlay open backdrop={<OverlayBackdrop />}>
<OverlayCenter className={css.OverlayFrame}>
<FocusTrap
focusTrapOptions={{
initialFocus: false,
onDeactivate: onClose,
clickOutsideDeactivates: true,
escapeDeactivates: stopPropagation,
}}
>
<Dialog variant="Surface" className={css.DialogShell}>
<Box className={css.Hero}>
<Box className={css.HeroRow}>
<img className={css.HeroLogo} src={PaarrotSVG} alt="" draggable={false} />
@@ -177,5 +180,7 @@ export function UpdatesDialog({
</FocusTrap>
</OverlayCenter>
</Overlay>
</div>,
document.body
);
}