Simple refactor for skipLobby#30848
Merged
Merged
Conversation
5 tasks
Half-Shot
commented
Sep 23, 2025
| room_id: roomId, | ||
| view_call: true, | ||
| skipLobby: "shiftKey" in ev ? ev.shiftKey : false, | ||
| skipLobby: ("shiftKey" in ev && ev.shiftKey) || undefined, |
Member
Author
There was a problem hiding this comment.
Critically this means we only skipLobby when shiftKey is held, otherwise we follow defaults.
Half-Shot
commented
Sep 23, 2025
Half-Shot
commented
Sep 23, 2025
| <CallView | ||
| room={this.state.room} | ||
| resizing={this.state.resizing} | ||
| skipLobby={this.context.roomViewStore.skipCallLobby() ?? false} |
Member
Author
There was a problem hiding this comment.
skipLobby is now a parameter on ElementCall.start, so it doesn't need to appear in any of the views :- all entrypoints eventually call the same logic in RoomViewStore
Half-Shot
commented
Sep 23, 2025
| // Immediately start the call. This will connect to all required widget events | ||
| // and allow the widget to show the lobby. | ||
| if (call.connectionState === ConnectionState.Disconnected) call.start(); | ||
| if (call.connectionState === ConnectionState.Disconnected) call.start({ skipLobby: payload.skipLobby }); |
Member
Author
There was a problem hiding this comment.
Every time a user in Element switches to a call, this section will be reached. It's therefore fine to pass through user-controlled parameters through start and a whole lot cleaner too.
Half-Shot
commented
Sep 23, 2025
| expect(cleanSpy).toHaveBeenCalled(); | ||
| }); | ||
|
|
||
| it("updates the call's skipLobby parameter", async () => { |
Member
Author
There was a problem hiding this comment.
No longer handled here. The playwright tests cover this sufficiently.
robintown
requested changes
Sep 24, 2025
5 tasks
BillCarsonFr
approved these changes
Sep 25, 2025
robintown
approved these changes
Sep 25, 2025
MidhunSureshR
approved these changes
Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces #30833
This is a much simpler solution to achieve the same goal; we want to include skipLobby after user interaction to ensure the call starts in the correct state, but critically we also want to unset the value if the user doesn't provide a preference to allow Element Call to determine the correct state.
Rather than trying to unpick preloading of widgets, for now we just regenerate the URL shortly before
start()ing the call which hopefully ensures it gets the correct state.Checklist
public/exportedsymbols have accurate TSDoc documentation.