Separate layout's logic from ranking logic #1133
Labels
A-Developer-Experience
Workflow of developing: building, linting, debugging, profiling, etc.
A-Spotlight
Spotlight layout, where the active speaker is foregrounded
T-Task
Refactoring, enabling or disabling functionality, other engineering tasks
Currently, the grid layout has too many responsibilities that make changes hard and increase the likelihood of bugs.
We need to separate the rendering/animation logic from the logic that orders the tiles (decides on the ranking of elements).
See #1092 (comment) for more details.
@robintown, here I would like to describe a rough idea of how I think we could refactor it to make it better:
id
,rank
(ororder
), andhighlight
(for speaking indicators).This way we not only decouple two concepts from each other allowing different people to work on different parts without knowing the implementation detail on the other part but also potentially fixing bugs as the responsibilities of each component are clearly defined and there are no implicit expectations from the caller regarding how the render will re-order the tiles.
We also gain more flexibility as we don't need to change anything in the grid layout whenever we want to change the order in which the participants are displayed or highlighted.
So in this case the input to the grid layout will be:
The text was updated successfully, but these errors were encountered: