Skip to content

Remove unneeded CustomChatComponentFactory from compose sample#6352

Merged
gpunto merged 1 commit intov7from
rm-unneeded-factory
Apr 10, 2026
Merged

Remove unneeded CustomChatComponentFactory from compose sample#6352
gpunto merged 1 commit intov7from
rm-unneeded-factory

Conversation

@gpunto
Copy link
Copy Markdown
Contributor

@gpunto gpunto commented Apr 9, 2026

Goal

This factory became unneeded after I removed pinned item customizations in #6340

Implementation

Remove the factory and update usages

🎨 UI Changes

None

Testing

The sample should work as before

Summary by CodeRabbit

  • Refactor

    • Streamlined chat theme component configuration across sample app activities.
    • Updated component factory implementation in messaging views for consistency.
  • Chores

    • Removed unused custom component factory code from sample application.

@gpunto gpunto added pr:demo-app Changes specific to demo app pr:ignore-for-release Exclude from release notes and removed pr:ignore-for-release Exclude from release notes labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled.

🎉 Great job! This PR is ready for review.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.82 MB 0.57 MB 🔴
stream-chat-android-ui-components 10.60 MB 10.96 MB 0.36 MB 🟡
stream-chat-android-compose 12.81 MB 12.25 MB -0.56 MB 🚀

@gpunto gpunto marked this pull request as ready for review April 9, 2026 13:52
@gpunto gpunto requested a review from a team as a code owner April 9, 2026 13:52
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 9, 2026

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: 1d9a4c22-87ef-4de0-bf4b-3bc8e0497da3

📥 Commits

Reviewing files that changed from the base of the PR and between 4008e90 and 198bd32.

📒 Files selected for processing (4)
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/CustomChatComponentFactory.kt
💤 Files with no reviewable changes (3)
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/CustomChatComponentFactory.kt

Walkthrough

The sample app refactors component factory usage by removing CustomChatComponentFactory entirely. MessagesActivity switches to using LocationComponentFactory directly, while ChannelsActivity and ChatsActivity stop passing a custom factory, relying instead on ChatTheme's default component factory behavior.

Changes

Cohort / File(s) Summary
Removed Custom Component Factory
stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/feature/channel/list/ChannelsActivity.kt, stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.kt
Removed componentFactory = CustomChatComponentFactory() parameter from ChatTheme invocations, eliminating explicit custom component injection.
Switched to Location Factory
stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/MessagesActivity.kt
Replaced CustomChatComponentFactory(locationViewModelFactory = ...) with LocationComponentFactory(locationViewModelFactory = ...) in ChatTheme, including updated import.
Deleted Custom Factory Implementation
stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/component/CustomChatComponentFactory.kt
Removed entire file containing CustomChatComponentFactory, which previously delegated to LocationComponentFactory and overrode ChannelListItemContent to provide swipe-enabled channel list items.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A factory once grand, now fades away,
Location takes the stage in bright array,
The channels simplified, no custom cast,
Defaults reign supreme at long last! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing the CustomChatComponentFactory from the compose sample, which aligns with the primary objective of the changeset.
Description check ✅ Passed The description provides the required Goal and Implementation sections. UI Changes and Testing sections are included. However, it omits most template items like contributor/reviewer checklists, issue linking, and CLA confirmation.

✏️ 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 rm-unneeded-factory

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.

@gpunto gpunto enabled auto-merge (squash) April 9, 2026 16:04
@gpunto gpunto force-pushed the rm-unneeded-factory branch from 28845fa to 727ba8d Compare April 10, 2026 11:05
@sonarqubecloud
Copy link
Copy Markdown

@gpunto gpunto disabled auto-merge April 10, 2026 12:11
@gpunto gpunto merged commit 7b9fcd0 into v7 Apr 10, 2026
14 of 15 checks passed
@gpunto gpunto deleted the rm-unneeded-factory branch April 10, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:demo-app Changes specific to demo app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants