Skip to content

Add participantLabelContent slot to CallLobby#1726

Open
aleksandar-apostolov wants to merge 1 commit into
developfrom
feature/call-lobby-participant-label-slot
Open

Add participantLabelContent slot to CallLobby#1726
aleksandar-apostolov wants to merge 1 commit into
developfrom
feature/call-lobby-participant-label-slot

Conversation

@aleksandar-apostolov

@aleksandar-apostolov aleksandar-apostolov commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Goal

The CallLobby composable renders ParticipantLabel unconditionally 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

  • Add a new CallLobby overload taking participantLabelContent: @Composable BoxScope.() -> Unit in place of labelPosition: Alignment. The default reproduces today's rendering (name + microphone indicator at BottomStart). Pass {} to hide it, or override to supply custom content and positioning (use BoxScope.align inside).
  • Deprecate the previous overload (with labelPosition); it now delegates to the new one. labelPosition is required on the deprecated overload so source-level overload resolution remains unambiguous — callers that did not pass labelPosition migrate silently to the new overload with no visual change.
  • Extract DefaultParticipantLabel so both overloads share the same default rendering.
  • Regenerate .api and update CHANGELOG.md.

Mirrors React VideoPreview's slot-based overrides (DisabledVideoPreview, NoCameraPreview, StartingCameraPreview).

// Hide the label
CallLobby(call = call, participantLabelContent = {})

// Custom label at top-end
CallLobby(
    call = call,
    participantLabelContent = {
        MyLabel(modifier = Modifier.align(Alignment.TopEnd))
    },
)

🎨 UI Changes

No visual change at defaults — existing call sites do not pass labelPosition and resolve to the new overload, whose default slot reproduces prior rendering.

Testing

./gradlew :stream-video-android-ui-compose:spotlessApply :stream-video-android-ui-compose:apiDump passes locally. The existing CallLobbyTest paparazzi snapshot should remain unchanged (default slot = prior rendering). Manual verification: pass participantLabelContent = {} and confirm the label is hidden; supply a custom slot and confirm placement.

☑️Contributor Checklist

General

  • PR targets the develop branch

Code & documentation

  • Changelog is updated with client-facing changes

☑️Reviewer Checklist

  • Compose sample runs & works
  • New feature tested and works (participantLabelContent = {} hides the label; custom slot positions correctly)
  • Default rendering unchanged (existing call sites resolve to the new overload)

Summary by CodeRabbit

  • New Features

    • Enhanced CallLobby with improved participant label customization. The label can now be hidden entirely or fully customized through a new composable content block.
  • Documentation

    • Updated changelog with migration guidance for the participant label customization changes.

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.
@aleksandar-apostolov aleksandar-apostolov added the pr:new-feature Adds new functionality label Jun 17, 2026
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

PR checklist ❌

The following issues were detected:

  • Linked issue missing. Add a Linear ticket reference (e.g. AND-123, Closes AND-123, or a https://linear.app/... link) or a GitHub issue (Closes #123) to the PR description.

What we check

  1. Title is concise (5–18 words) unless labeled pr:ignore-for-release.
  2. At least one pr: label exists (e.g., pr:bug, pr:new-feature).
  3. Sections ### Goal, ### Implementation, and ### Testing contain content. Bot-authored PRs are exempt.
  4. PR description references an issue (Linear ticket like AND-123, a Linear URL, or a GitHub Closes #N). Bot-authored PRs are exempt.

@github-actions

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 12.27 MB 12.27 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.68 MB 5.68 MB 0.00 MB 🟢
stream-video-android-ui-compose 6.28 MB 6.28 MB 0.00 MB 🟢

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
44.2% Coverage on New Code (required ≥ 80%)
23.3% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@aleksandar-apostolov aleksandar-apostolov marked this pull request as ready for review June 18, 2026 08:40
@aleksandar-apostolov aleksandar-apostolov requested a review from a team as a code owner June 18, 2026 08:40
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: afc04b06-8288-4b05-ac65-3b3aafe7f6ec

📥 Commits

Reviewing files that changed from the base of the PR and between c5bcc10 and 7ec4e33.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • stream-video-android-ui-compose/api/stream-video-android-ui-compose.api
  • stream-video-android-ui-compose/src/main/kotlin/io/getstream/video/android/compose/ui/components/call/lobby/CallLobby.kt

Walkthrough

CallLobby replaces its labelPosition: Alignment parameter with a participantLabelContent: @composable BoxScope.() -> Unit composable slot. The previous inline label construction is extracted into a private DefaultParticipantLabel helper. The deprecated overload is updated to delegate to the new signature by forwarding its labelPosition into the slot. The exported API file and changelog are updated accordingly.

Changes

CallLobby participantLabelContent slot

Layer / File(s) Summary
CallLobby slot implementation and deprecated overload
stream-video-android-ui-compose/src/main/kotlin/.../lobby/CallLobby.kt
Adds BoxScope import; updates KDoc; removes labelPosition from the primary CallLobby signature; adds participantLabelContent: @composable BoxScope.() -> Unit slot defaulting to DefaultParticipantLabel; replaces inline label rendering with participantLabelContent(); reworks the deprecated overload to delegate via the new slot; extracts prior inline ParticipantLabel construction into a private BoxScope.DefaultParticipantLabel helper.
Exported API surface and changelog
stream-video-android-ui-compose/api/stream-video-android-ui-compose.api, CHANGELOG.md
Updates the .api file to reflect the removed Alignment parameter and added Function3 callback in CallLobby's JVM signature; adds changelog entries for the new slot and the deprecated labelPosition overload.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A slot for labels, now open and free,
BoxScope aligned just where you want it to be 🐇
The old labelPosition hops off with a bow,
Deprecated but guided — it still knows the flow.
Customize, hide, or keep the default in place,
The lobby's participants shown with new grace! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a participantLabelContent slot to CallLobby composable, which is the central feature of this PR.
Description check ✅ Passed The description is comprehensive, covering goal, implementation details, UI changes, testing approach, and contributor checklist items. Required template sections are well-populated with meaningful content.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/call-lobby-participant-label-slot

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:new-feature Adds new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant