Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Abramov
0105162ffa Enable strict lints
An attempt to fix https://github.com/vector-im/element-call/issues/1132
2023-07-11 16:02:58 +01:00
Robin Townsend
3ac98c8865 Make the expand and collapse interactions inverses of one another
For the most part, at least. If the edge cases where they differ still feel weird, I can iterate on this further.

The diff is unfortunately a bit impenetrable, because I had to change both the fillGaps and cycleTileSize core algorithms used by the big grid layout. But: the main change of significance is the addition of a function vacateArea, which clears out an area within the grid in a specific way that mirrors the motion performed by fillGaps.
2023-07-06 00:59:14 -04:00
Robin Townsend
cc35f243f2 Make NewVideoGrid support arbitrary layout systems
In preparation for adding layouts other than big grid to the NewVideoGrid component, I've abstracted the grid layout system into an interface called Layout. For now, the only implementation of this interface is BigGrid, but this will allow us to easily plug in Spotlight, SplitGrid, and OneOnOne layout systems so we can get rid of the old VideoGrid component and have One Grid to Rule Them All™.

Please do shout if any of this seems obtuse or underdocumented, because I'm not super happy with how approachable the NewVideoGrid code looks right now…

Incidentally, this refactoring made it way easier to save the state of the grid while in fullscreen / another layout, so I went ahead and did that.
2023-06-27 14:20:45 -04:00