Skip to content

Conversation

@Half-Shot
Copy link
Member

@Half-Shot Half-Shot commented Sep 23, 2025

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

room_id: roomId,
view_call: true,
skipLobby: "shiftKey" in ev ? ev.shiftKey : false,
skipLobby: ("shiftKey" in ev && ev.shiftKey) || undefined,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critically this means we only skipLobby when shiftKey is held, otherwise we follow defaults.

<CallView
room={this.state.room}
resizing={this.state.resizing}
skipLobby={this.context.roomViewStore.skipCallLobby() ?? false}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

// 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 });
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

expect(cleanSpy).toHaveBeenCalled();
});

it("updates the call's skipLobby parameter", async () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer handled here. The playwright tests cover this sufficiently.

@Half-Shot Half-Shot changed the title Simple refactor for skipLobby (and remove returnToLobby) Simple refactor for skipLobby Sep 25, 2025
@Half-Shot Half-Shot requested a review from robintown September 25, 2025 07:17
@Half-Shot Half-Shot enabled auto-merge September 25, 2025 12:33
@Half-Shot Half-Shot added this pull request to the merge queue Sep 25, 2025
Merged via the queue into develop with commit 75083c2 Sep 25, 2025
35 checks passed
@Half-Shot Half-Shot deleted the hs/always-skip-lobby-alt-take branch September 25, 2025 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants