Implement recordings fullscreen and rework recordings layout size calculation (#11318)

* Implement fullscreen button

* wrap items on mobile

* control based on width

* refresh

* Implement basic fullscreen

* Fix scrolling

* Add observer to detect of row overflows

* Use cn to simplify classnames

* dynamically respond to layout sizing

* Simplify listener

* Simplify layout

* Handle tall browser
This commit is contained in:
Nicolas Mowen
2024-05-09 15:06:29 -06:00
committed by GitHub
parent 021ffb2437
commit 8b344cea81
6 changed files with 180 additions and 19 deletions

View File

@@ -43,5 +43,19 @@ export function useResizeObserver(...refs: RefType[]) {
};
}, [refs, resizeObserver]);
return dimensions;
if (dimensions.length == refs.length) {
return dimensions;
} else {
const items = [...dimensions];
for (let i = dimensions.length; i < refs.length; i++) {
items.push({
width: 0,
height: 0,
x: -Infinity,
y: -Infinity,
});
}
return items;
}
}