Refactor element call lobby + skip lobby - #12057
Conversation
- expose skip lobby - use the widget.data to build the widget url Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
f984491 to
9d1a3f4
Compare
Signed-off-by: Timo K <toger5@hotmail.de>
9d1a3f4 to
8ed0454
Compare
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
And use them for integrated lobby. Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
…pening the lobby) Signed-off-by: Timo K <toger5@hotmail.de>
Not on widget creation. Signed-off-by: Timo K <toger5@hotmail.de>
robintown
left a comment
There was a problem hiding this comment.
I was able to follow this for the most part, but the one part I need reminding about is why we need to use the 'connected' state for simply viewing the lobby
| view_call?: boolean; // Whether to view the call or call lobby for the room | ||
| skipLobby?: boolean; // Whether to skip the call lobby when showing the call (only supported for element calls) |
There was a problem hiding this comment.
Non-blocking comment: I just had the thought that these two fields could be combined in a single view_call?: "lobby" | "call" field, for the sake of keeping related data together. Otherwise you end up with { action: "view_room", view_call: undefined, skipLobby: true } as a possible payload, which isn't very meaningful IMO.
There was a problem hiding this comment.
I see the redundance in the information (4 casses for 3 possible scenarios)
I thought about it for a bit but for the sake of intruducing fewer termonology I think we should keep it for now.
skipLobby is a documented term also in EC. intrducing "view_room":"lobby" would need everyone to understand that this results in skipLobby=true.
So if we fix this it should be fixed for the whole chain: EC would need to get a view property which an be set to "lobby" or `"call".
WDYT?
There was a problem hiding this comment.
Hmm, I do see the value in having the terms be consistent. Maybe we could go with view_call?: "lobby" | "skipLobby" to keep the connection there without needing to change how EC handles this flag?
There was a problem hiding this comment.
That reduces the possible inputs to 3 (which makes sense sicne there are only 3 possible choices)
It is slighly harder to read (a bit more confusing) in the case there is a running call and its just about showing that call. In this case one need to set it to "lobby" but just wants to show the running call.
And undefined would mean it deos NOT show the call (moves the call to pip)
There was a problem hiding this comment.
Is there something like rust enums:
enum ViewCallSettings{
ViewCall(LobbySetting),
UnViewCall,
Keep,
}
enum LobbySetting{
Skip,
Show,
Default
}
Its really 5 cases in the end:
- view call with whatever lobby setting is the default
- view call with in lobby state
- view call and skip the lobby
- Explicitly dont view the call but instead the caht
- dispatch a roomView update but dont touch the view call settings
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: Robin <robin@robin.town>
Signed-off-by: Timo K <toger5@hotmail.de>
Signed-off-by: Timo K <toger5@hotmail.de>
This PR can be reviewed per commit:
widget.datawhich makes it easy to parse the current widget configuration.All the following commits refactor and add a lot of testing changes.
Signed-off-by: Timo K toger5@hotmail.de
Requires: element-hq/element-web#26879
Alert
In its current state this breaks Jitsi (because its removing the lobby code entirely)
Checklist
Here's what your changelog entry will look like:
✨ Features