mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
Merge pull request #3983 from element-hq/one-on-one-portrait-regressions
Fix a couple more regressions due to the one-on-one portrait layout
This commit is contained in:
@@ -516,11 +516,11 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
key="fixed"
|
key="fixed"
|
||||||
className={styles.fixedGrid}
|
className={styles.fixedGrid}
|
||||||
style={{
|
style={{
|
||||||
insetBlockStart:
|
// If not edge-to-edge, consume the header insets right here.
|
||||||
edgeToEdge || headerBounds.height === 0 ? 0 : headerBounds.bottom,
|
insetBlockStart: edgeToEdge ? 0 : bounds.top + headerBounds.height,
|
||||||
height: edgeToEdge ? "100%" : gridBounds.height,
|
height: edgeToEdge ? "100%" : gridBounds.height,
|
||||||
// If edge-to-edge, compute new safe area insets that account for the
|
// If edge-to-edge, compute new safe area insets that account for the
|
||||||
// header and footer.
|
// header and footer, passing them down to the tiles.
|
||||||
"--call-view-safe-area-inset-top":
|
"--call-view-safe-area-inset-top":
|
||||||
edgeToEdge && headerStyle !== HeaderStyle.None && showHeader
|
edgeToEdge && headerStyle !== HeaderStyle.None && showHeader
|
||||||
? // Header has two relevant cases: if it's an app bar, it lives
|
? // Header has two relevant cases: if it's an app bar, it lives
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ exports[`InCallView > rendering > renders 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="fixedGrid grid"
|
class="fixedGrid grid"
|
||||||
|
style="inset-block-start: NaNpx;"
|
||||||
>
|
>
|
||||||
<div />
|
<div />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1070,10 +1070,12 @@ export function createCallViewModel$(
|
|||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const spotlightLandscapeLayoutMedia$: Observable<SpotlightLandscapeLayoutMedia> =
|
const spotlightLandscapeLayoutMedia$ = (
|
||||||
|
edgeToEdge: boolean,
|
||||||
|
): Observable<SpotlightLandscapeLayoutMedia> =>
|
||||||
combineLatest([grid$, spotlight$], (grid, spotlight) => ({
|
combineLatest([grid$, spotlight$], (grid, spotlight) => ({
|
||||||
type: "spotlight-landscape",
|
type: "spotlight-landscape",
|
||||||
edgeToEdge: false,
|
edgeToEdge,
|
||||||
spotlight,
|
spotlight,
|
||||||
grid,
|
grid,
|
||||||
}));
|
}));
|
||||||
@@ -1208,7 +1210,7 @@ export function createCallViewModel$(
|
|||||||
switchMap((expanded) =>
|
switchMap((expanded) =>
|
||||||
expanded
|
expanded
|
||||||
? spotlightExpandedLayoutMedia$(false)
|
? spotlightExpandedLayoutMedia$(false)
|
||||||
: spotlightLandscapeLayoutMedia$,
|
: spotlightLandscapeLayoutMedia$(false),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1234,7 +1236,7 @@ export function createCallViewModel$(
|
|||||||
case "grid":
|
case "grid":
|
||||||
// Yes, grid mode actually gets you a "spotlight" layout in
|
// Yes, grid mode actually gets you a "spotlight" layout in
|
||||||
// this window mode.
|
// this window mode.
|
||||||
return spotlightLandscapeLayoutMedia$;
|
return spotlightLandscapeLayoutMedia$(true);
|
||||||
case "spotlight":
|
case "spotlight":
|
||||||
return spotlightExpandedLayoutMedia$(true);
|
return spotlightExpandedLayoutMedia$(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export interface GridLayoutMedia {
|
|||||||
|
|
||||||
export interface SpotlightLandscapeLayoutMedia {
|
export interface SpotlightLandscapeLayoutMedia {
|
||||||
type: "spotlight-landscape";
|
type: "spotlight-landscape";
|
||||||
edgeToEdge: false;
|
edgeToEdge: boolean;
|
||||||
spotlight: MediaViewModel[];
|
spotlight: MediaViewModel[];
|
||||||
grid: UserMediaViewModel[];
|
grid: UserMediaViewModel[];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user