Because useMeasure always returns a width and height of zero on the first render, various call UI elements would flash in and out of existence or animate in from the wrong place when joining a call. This poses an accessibility issue, and is generally unpleasant.
The 'connecting' tile change meant that we could have tiles right
at the start of the call where we wouldn't have before, and in fact
could have tiles for other users before we even had a tile for ourself.
This threw off the logic for ordering tiles which had a special case
for 1:1 calling which assumed that one of the tiles in a 1:1 call was
the local user. In this case, this assumption wasn't true at the very
start of the call, so the tile orders got assigned incorrectly and then
persisted for the rest of the call.
Fixes https://github.com/vector-im/element-call/issues/694
The code was previously confusing focused and presenter tiles quite a bit, and also had a couple different spots that would mistakenly engage 1:1 layout behavior when you're alone with your own screensharing feed.
This was a confusion between indicies of the tile and the tile position:
the spotlight tile is the 0th TilePosition, ie. the tile with order
0, not the tile with index 0.
Also comment one method to hopefully make this slightly easier to
understand.