Add participantLabelContent slot to CallLobby#1726
Conversation
The previous CallLobby rendered the lobby participant label
unconditionally with no way to hide or override it. iOS and React do
not render a participant label on the local preview, so Android was
the outlier and customers had no escape hatch.
Add a participantLabelContent slot (matches React VideoPreview's
slot-based overrides). Pass `{}` to hide the label or override to
supply custom content and positioning. The previous overload
(labelPosition: Alignment) is deprecated and delegates to the new one.
PR checklist ❌The following issues were detected:
What we check
|
SDK Size Comparison 📏
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Walkthrough
ChangesCallLobby
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |


Goal
The
CallLobbycomposable rendersParticipantLabelunconditionally with no way to hide or override it. iOS (LobbyView) and React (VideoPreview) do not render a participant label on the local preview, so Android was the outlier. Customer feedback asked to make this optional.Implementation
CallLobbyoverload takingparticipantLabelContent: @Composable BoxScope.() -> Unitin place oflabelPosition: Alignment. The default reproduces today's rendering (name + microphone indicator atBottomStart). Pass{}to hide it, or override to supply custom content and positioning (useBoxScope.aligninside).labelPosition); it now delegates to the new one.labelPositionis required on the deprecated overload so source-level overload resolution remains unambiguous — callers that did not passlabelPositionmigrate silently to the new overload with no visual change.DefaultParticipantLabelso both overloads share the same default rendering..apiand updateCHANGELOG.md.Mirrors React
VideoPreview's slot-based overrides (DisabledVideoPreview,NoCameraPreview,StartingCameraPreview).🎨 UI Changes
No visual change at defaults — existing call sites do not pass
labelPositionand resolve to the new overload, whose default slot reproduces prior rendering.Testing
./gradlew :stream-video-android-ui-compose:spotlessApply :stream-video-android-ui-compose:apiDumppasses locally. The existingCallLobbyTestpaparazzi snapshot should remain unchanged (default slot = prior rendering). Manual verification: passparticipantLabelContent = {}and confirm the label is hidden; supply a custom slot and confirm placement.☑️Contributor Checklist
General
developbranchCode & documentation
☑️Reviewer Checklist
participantLabelContent = {}hides the label; custom slot positions correctly)Summary by CodeRabbit
New Features
CallLobbywith improved participant label customization. The label can now be hidden entirely or fully customized through a new composable content block.Documentation