diff --git a/playwright/widget/test-helpers.ts b/playwright/widget/test-helpers.ts index 372394ac8..21d76ac2e 100644 --- a/playwright/widget/test-helpers.ts +++ b/playwright/widget/test-helpers.ts @@ -375,25 +375,11 @@ export class TestHelpers { frame: FrameLocator, count: number, ): Promise { - // XXX we need to be better at our HTML markup and accessibility, it would make - // this kind of stuff way easier to test if we could look out for aria attributes. - await expect - .poll( - async () => { - return await frame - .locator("video") - .evaluateAll( - (videos: Element[]) => - videos.filter( - (v: Element) => - window.getComputedStyle(v).display === "block", - ).length, - ); - }, - { - timeout: 10000, - }, - ) - .toBe(count); + await expect( + frame + .getByRole("img") + .and(frame.locator("video")) + .filter({ visible: true }), + ).toHaveCount(count, { timeout: 10000 }); } } diff --git a/src/components/CallFooter.module.css b/src/components/CallFooter.module.css index adff99d52..d919b33eb 100644 --- a/src/components/CallFooter.module.css +++ b/src/components/CallFooter.module.css @@ -19,11 +19,6 @@ Please see LICENSE in the repository root for full details. padding-right: calc(env(safe-area-inset-right) + var(--cpd-space-6x)); padding-block: var(--cpd-space-10x) calc(env(safe-area-inset-bottom) + var(--cpd-space-10x)); - background: linear-gradient( - 180deg, - rgba(0, 0, 0, 0) 0%, - var(--cpd-color-bg-canvas-default) 100% - ); } .footer.hidden { diff --git a/src/components/CallFooter.tsx b/src/components/CallFooter.tsx index f952601dc..f983d809d 100644 --- a/src/components/CallFooter.tsx +++ b/src/components/CallFooter.tsx @@ -112,11 +112,17 @@ export interface FooterState { } export interface FooterProps { + className?: string; ref?: Ref; children?: JSX.Element | JSX.Element[] | false; vm: ViewModel; } -export const CallFooter: FC = ({ ref, children, vm }) => { +export const CallFooter: FC = ({ + className, + ref, + children, + vm, +}) => { const asOverlay = useBehavior(vm.asOverlay$); const showFooter = useBehavior(vm.showFooter$); const hideControls = useBehavior(vm.hideControls$); @@ -292,7 +298,7 @@ export const CallFooter: FC = ({ ref, children, vm }) => {
.footer, +.fixedGrid:has( + > .tile[data-maximised="true"] + .spotlightItem[data-bg-style="transparent"][data-video-enabled="true"][aria-hidden="false"] + ) + ~ .footer { + background: linear-gradient( + 180deg, + rgba(0, 0, 0, 0) 0%, + var(--cpd-color-bg-canvas-default) 100% + ); +} + .header { position: sticky; flex-shrink: 0; @@ -82,19 +99,18 @@ Please see LICENSE in the repository root for full details. /* Disable pointer events so the overlay doesn't block interaction with elements behind it */ pointer-events: none; -} -.fixedGrid > :not(:first-child), -.scrollingGrid > :not(:first-child) { - pointer-events: initial; + > :not(:first-child) { + pointer-events: initial; + } + + .tile { + position: absolute; + inset-block-start: 0; + } } .tile { - position: absolute; - inset-block-start: 0; -} - -.tile.maximised { position: relative; flex-grow: 1; } diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 5872cfb44..ce27fe3c7 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -259,6 +259,7 @@ export const InCallView: FC = ({ const reconnecting = useBehavior(vm.reconnecting$); const layout = useBehavior(vm.layout$); const edgeToEdge = useBehavior(vm.edgeToEdge$); + const overflowing = useBehavior(vm.overflowing$); const showNameTags = useBehavior(vm.showNameTags$); const showHeader = useBehavior(vm.showHeader$); const settingsOpen = useBehavior(vm.settingsOpen$); @@ -468,6 +469,7 @@ export const InCallView: FC = ({ showRingingStatus={showRingingStatus} focusable={!contentObscured} className={classNames(className, styles.tile)} + itemClassName={styles.spotlightItem} style={style} /> ); @@ -492,7 +494,9 @@ export const InCallView: FC = ({ if (layout.type === "pip") { return ( = ({ // Only hide the settings button if we have an AppBar header and we are showing the header const footer = footerVm !== null && ( - + ); const allConnections = useBehavior(vm.allConnections$); @@ -593,7 +597,9 @@ export const InCallView: FC = ({ // and the footer is also viewable by moving focus into it, so this is fine. // eslint-disable-next-line jsx-a11y/no-static-element-interactions
rendering > renders 1`] = ` class="container" />