Skip to content

Redesign group channel info edit screen#6301

Merged
andremion merged 18 commits intov7from
redesign/AND-1135-redesign-channel-info-edit-screen
Mar 31, 2026
Merged

Redesign group channel info edit screen#6301
andremion merged 18 commits intov7from
redesign/AND-1135-redesign-channel-info-edit-screen

Conversation

@andremion
Copy link
Copy Markdown
Contributor

@andremion andremion commented Mar 27, 2026

Goal

Redesign the group channel info edit experience: replace the inline rename field with a dedicated full-screen edit screen with channel image upload support, and clean up dead code paths.

Implementation

  • Added GroupChannelEditScreen with channel avatar (local preview on selection), image upload (gallery/camera/remove via bottom sheet), name field, and save action. Opened via "Edit" button in the group channel info top bar.
  • Added GroupChannelEditViewModel (compose-only) — batches name + image changes into a single updatePartial call. All screen state survives DKA via rememberSaveable.
  • Replaced RenameChannel/UserInfo options with EditChannel, gated by UPDATE_CHANNEL capability.
  • Removed dead UserInfoClick action and CopyToClipboardHandler from the ViewModel/Controller chain.
  • Marked AddMembersViewAction/AddMembersViewState as @InternalStreamChatApi.
  • Fixed race condition in AddMembersViewController.loadMore() — stale pagination results could contaminate a newer search.
  • Added systemCaret color token to StreamDesign.Colors.

🎨 UI Changes

Updating name Updating picture
Screen_recording_20260327_105653.webm
Screen_recording_20260327_152421.webm

Testing

  1. Group channel edit (name) — Open group channel info, tap "Edit", change the name and save. Verify the name updates, the loading spinner shows in the save button spot, and the dialog dismisses on success.
  2. Group channel edit (image) — Tap "Upload", select an image from gallery. Verify the avatar preview updates immediately. Save and verify the channel image updates on the info screen.
  3. Group channel edit (camera) — Tap "Upload" → "Take Photo", take a photo. Verify the avatar preview updates. Repeat with DKA ON to verify state survives.
  4. Group channel edit (remove image) — On a channel with an image, tap "Upload" → "Remove Picture". Verify the avatar resets. Save and verify.
  5. Group channel edit (error) — Disconnect from the network, try to save. Verify a toast error appears and the dialog stays open.
  6. Edit button visibility — On a channel without UPDATE_CHANNEL capability, verify the "Edit" button is hidden.
  7. Add Members pagination — Scroll to load more, then type a search query mid-flight. Verify no stale results appear.

Summary by CodeRabbit

  • New Features

    • Added group channel editing capability allowing users to update channel name and picture with real-time preview and error handling.
  • Improvements

    • Streamlined channel information screen by consolidating channel editing options into a dedicated edit interface accessible from the top bar.
  • Refactor

    • Removed internal dependencies and simplified factory construction patterns for improved maintainability.

@andremion andremion added the pr:new-feature New feature label Mar 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 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 Mar 27, 2026

SDK Size Comparison 📏

SDK Before After Difference Status
stream-chat-android-client 5.25 MB 5.68 MB 0.43 MB 🟡
stream-chat-android-ui-components 10.60 MB 10.99 MB 0.39 MB 🟡
stream-chat-android-compose 12.81 MB 12.13 MB -0.68 MB 🚀

@andremion andremion force-pushed the redesign/AND-1135-redesign-channel-info-edit-screen branch from a5f2c84 to ed53ac2 Compare March 27, 2026 11:04
@andremion andremion changed the title Redesign/and 1135 redesign channel info edit screen Redesign group channel info edit screen Mar 27, 2026
@andremion andremion marked this pull request as ready for review March 27, 2026 15:33
@andremion andremion requested a review from a team as a code owner March 27, 2026 15:34
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Walkthrough

This PR refactors channel editing to use a dedicated screen and ViewModel, removes Context and CopyToClipboardHandler dependencies from channel info factories and ViewModels, and replaces UserInfo/RenameChannel options with a single EditChannel option. The top-bar action callback is renamed from onAddMembersClick to onActionClick.

Changes

Cohort / File(s) Summary
Factory and ViewModel Dependency Removal
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModel.kt, ChannelInfoViewModelFactory.kt, stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/channel/ChannelInfoViewModel.kt, ChannelInfoViewModelFactory.kt, sample and test files
Removed CopyToClipboardHandler parameter from ChannelInfoViewModel and removed Context parameter from ChannelInfoViewModelFactory across compose and ui-components modules. Updated all call sites in samples and tests to construct factories with only cid parameter.
Channel Edit Screen Implementation
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditScreen.kt, GroupChannelEditUtils.kt, GroupChannelEditViewModelTest.kt, GroupChannelEditTest.kt, stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/GroupChannelEditViewModel.kt
Added new GroupChannelEditScreen composable with image picker modal, new GroupChannelEditViewModel managing channel edit state and image uploads, utility function for caching picked images, and corresponding snapshot and unit tests.
Channel Info Options Refactoring
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoOptionItem.kt, ChannelInfoNameField.kt, ChannelInfoUserInfoOption.kt, stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/ChannelInfoViewAction.kt, ChannelInfoViewController.kt, state/channel/info/ChannelInfoViewState.kt, related test and sample files
Removed ChannelInfoNameField and ChannelInfoUserInfoOption composables, deleted UserInfoClick action and UserInfo option, renamed RenameChannel option to EditChannel (removing isReadOnly flag). Updated option handling in view controller and UI option items.
Top Bar Action Refactoring
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelInfoScreen.kt, ChatsActivity.kt, ChatComponentFactoryParams.kt, ChatComponentFactory.kt, sample activities
Renamed onAddMembersClick callback to onActionClick in GroupChannelInfoTopBar and related params. Updated top bar to show "Edit" button when EditChannel option is present. Refactored ChatsActivity to use new callback name and show outline button for edit action.
Theme and Resources
stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamDesign.kt, stream-chat-android-ui-common/src/main/res/values/strings.xml
Added systemCaret color property to StreamDesign.Colors (light: brand.s500, dark: brand.s400). Added 10 new string resources for channel edit UI (title, save action, field placeholder, upload/edit picture steps, error message) and removed stream_ui_channel_info_copy_user_handle.
Supporting Changes
stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/AddMembersViewAction.kt, AddMembersViewController.kt, stream-chat-android-ui-common/src/main/res/values/strings.xml, API files
Annotated AddMembersViewAction with @InternalStreamChatApi. Fixed pagination cancellation in AddMembersViewController by tracking loadMoreJob. Updated API stubs to reflect signature changes across modules.

Sequence Diagram

sequenceDiagram
    participant User
    participant GroupChannelInfoScreen
    participant GroupChannelEditScreen
    participant GroupChannelEditViewModel
    participant ImagePicker
    participant ChatClient
    participant Channel

    User->>GroupChannelInfoScreen: Tap Edit Action
    activate GroupChannelInfoScreen
    GroupChannelInfoScreen->>GroupChannelEditScreen: Show Dialog
    
    activate GroupChannelEditScreen
    GroupChannelEditScreen->>GroupChannelEditViewModel: Create Instance
    activate GroupChannelEditViewModel
    GroupChannelEditViewModel-->>GroupChannelEditScreen: Initial State (isSaving=false)
    
    User->>ImagePicker: Tap Upload Picture
    activate ImagePicker
    ImagePicker->>User: Show Options (Camera/Library)
    User->>ImagePicker: Select Image
    ImagePicker->>ImagePicker: Cache Image File
    ImagePicker-->>GroupChannelEditScreen: Return File
    deactivate ImagePicker
    
    User->>GroupChannelEditScreen: Edit Name & Tap Save
    GroupChannelEditScreen->>GroupChannelEditViewModel: save(name, imageFile, removeImage)
    activate GroupChannelEditViewModel
    GroupChannelEditViewModel->>ChatClient: uploadImage(file)
    activate ChatClient
    ChatClient-->>GroupChannelEditViewModel: Image URL
    deactivate ChatClient
    
    GroupChannelEditViewModel->>ChatClient: updatePartial(set={name, image})
    activate ChatClient
    ChatClient->>Channel: Update Channel
    Channel-->>ChatClient: Success
    deactivate ChatClient
    
    GroupChannelEditViewModel-->>GroupChannelEditScreen: SaveSuccess Event
    GroupChannelEditScreen->>User: Dismiss & Refresh
    deactivate GroupChannelEditViewModel
    deactivate GroupChannelEditScreen
    deactivate GroupChannelInfoScreen
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 The channel edits now flow,
In a screen all their own, don't you know?
No more clipboard concerns,
As the UI now turns,
To a cleaner, more focused tableau! 📸✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.90% 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 'Redesign group channel info edit screen' accurately summarizes the main objective of the PR, which is replacing the inline rename experience with a dedicated full-screen edit screen.
Description check ✅ Passed The PR description comprehensively follows the template structure with Goal, Implementation, UI Changes (videos), and Testing sections properly filled out with relevant details and testing steps.

✏️ 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 redesign/AND-1135-redesign-channel-info-edit-screen

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
stream-chat-android-compose/api/stream-chat-android-compose.api (2)

4216-4228: ⚠️ Potential issue | 🟡 Minor

Document the breaking ChannelInfoViewModel, ChannelInfoViewModelFactory, and GroupChannelInfoTopBarParams API changes in the v7 migration notes.

Line 4228 shows the callback renamed to onActionClick, and lines 6916–6928 show constructor parameters removed from ChannelInfoViewModel and ChannelInfoViewModelFactory. While breaking changes are acceptable for v7, the CHANGELOG currently does not document these signature changes. Add entries covering the exact parameter removals and callback renames so integrations using these APIs know what to update.

Also applies to: 6916-6928

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@stream-chat-android-compose/api/stream-chat-android-compose.api` around lines
4216 - 4228, The CHANGELOG/migration notes are missing documentation for
breaking API changes: update the v7 migration notes to list the signature
changes for ChannelInfoViewModel and ChannelInfoViewModelFactory (remove the
constructor parameters that were deleted) and for GroupChannelInfoTopBarParams
(note the callback rename to onActionClick); explicitly mention the exact
parameters removed and the renamed callback (onActionClick) so integrators can
map old constructors/parameters to the new ones and update their code
accordingly.

6267-6330: ⚠️ Potential issue | 🟡 Minor

Add migration documentation for the new systemCaret token in StreamDesign.Colors.

Lines 6267-6330 and 6385 introduce a new systemCaret field to the public StreamDesign.Colors data class. Apps that instantiate custom StreamDesign.Colors instances will need explicit guidance on this breaking change. Update migration or changelog documentation to cover this addition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@stream-chat-android-compose/api/stream-chat-android-compose.api` around lines
6267 - 6330, The public data class StreamDesign.Colors gained a new field
systemCaret; update the migration docs/changelog to document this breaking
change by (1) noting the new systemCaret token on StreamDesign.Colors, (2)
showing the fix for apps that construct custom StreamDesign.Colors instances
(explicitly add systemCaret with a default/appropriate value), and (3) adding a
short compatibility note and example for copy-7QP4Db0 / the Colors constructor
usage to ensure consumers know to set systemCaret when upgrading.
🧹 Nitpick comments (1)
stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.kt (1)

60-64: Refresh the EditChannel KDoc.

The type now represents entering the full channel edit flow, but the comment still describes a rename-only action. That mismatch will confuse SDK consumers reading the public API.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.kt`
around lines 60 - 64, The KDoc for the public data class EditChannel currently
says it’s a rename-only option but the type represents entering the full channel
edit flow; update the KDoc for EditChannel to describe that it opens the
complete channel edit screen/flow (not just rename), and revise the `@param` name
to indicate it’s the current channel name used as the initial value in the edit
flow; ensure the KDoc sits immediately above the public data class
EditChannel(val name: String) : Option so SDK consumers see the corrected
documentation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditScreen.kt`:
- Around line 124-130: The UI allows tapping Save before the picked media
finishes copying to cache so pendingImageFile can be null and the avatar is
lost; update the save flow so saving waits for the background import or disables
Save while import is in progress: expose the import state or a completion signal
from the media picker (e.g., an isImporting boolean or a Deferred/Callback
produced where pendingImageFile is set), surface that state into
GroupChannelEditContent (alongside channelName and isSaving) and change the
onSaveActionClick/use of viewModel.save to either await the import completion or
return early/disable the button until isImporting is false so viewModel.save
receives the actual cached file rather than null.

In
`@stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelInfoScreen.kt`:
- Around line 120-121: The saved dialog flags showEditChannel and showAddMembers
are not keyed by channel, causing state leakage when the pane is rebound to a
different channel; update the rememberSaveable calls to use a channel-scoped key
(e.g., headerViewModel.state or the channel.cid extracted from
headerViewModel.state) so each channel has its own saved state; locate the
rememberSaveable usages for showEditChannel and showAddMembers and add the key
parameter (using headerViewModel.state or channel.cid) to ensure dialogs aren’t
restored from a previous channel.

In
`@stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditTest.kt`:
- Around line 31-49: Rename the three test functions in GroupChannelEditTest
(placeholder, filled, saving) to use backtick-style Kotlin test names per repo
convention (e.g., replace fun placeholder() with a backtick-named test like fun
`placeholder snapshot`()), updating the function declarations only (the bodies
calling snapshotWithDarkMode { GroupChannelEditPlaceholder() },
snapshotWithDarkMode { GroupChannelEditFilled() }, and snapshotWithDarkMode {
GroupChannelEditSaving() } remain unchanged) so the tests follow the
`/**/src/test/**/*.kt` guideline for readability; ensure you update any imports
or references if needed.

In
`@stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channel/GroupChannelEditViewModelTest.kt`:
- Around line 162-171: The test currently uses givenUpdatePartial() which
returns a completed call (via asCall()), allowing the first save coroutine to
finish before the second save is invoked; change the fixture/mocking so the
first update/save call is a blocking or delayed Call (e.g., a
CompletableDeferred-backed or delayed fake) so that when sut.save(name="first",
...) is invoked it sets isSaving=true and remains in-flight when
sut.save(name="second", ...) is called; update the test to assert only one
GroupChannelEditViewEvent.SaveSuccess is emitted and verify the underlying
update method (the repository/SDK method mocked by givenUpdatePartial()) was
invoked exactly once, ensuring the second request was not forwarded.

In
`@stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/AddMembersViewAction.kt`:
- Around line 19-25: The new `@InternalStreamChatApi` annotation on
AddMembersViewAction/AddMembersViewState/AddMembersViewController requires call
sites to opt-in; add a file-level opt-in annotation
(`@file`:OptIn(InternalStreamChatApi::class)) to each caller file that imports or
uses these symbols—specifically update AddMembersScreen.kt,
AddMembersViewModelTest.kt, AddMembersViewController.kt, and
AddMembersViewControllerTest.kt—to include the opt-in so the compiler accepts
usage of AddMembersViewAction, AddMembersViewState, and
AddMembersViewController.

---

Outside diff comments:
In `@stream-chat-android-compose/api/stream-chat-android-compose.api`:
- Around line 4216-4228: The CHANGELOG/migration notes are missing documentation
for breaking API changes: update the v7 migration notes to list the signature
changes for ChannelInfoViewModel and ChannelInfoViewModelFactory (remove the
constructor parameters that were deleted) and for GroupChannelInfoTopBarParams
(note the callback rename to onActionClick); explicitly mention the exact
parameters removed and the renamed callback (onActionClick) so integrators can
map old constructors/parameters to the new ones and update their code
accordingly.
- Around line 6267-6330: The public data class StreamDesign.Colors gained a new
field systemCaret; update the migration docs/changelog to document this breaking
change by (1) noting the new systemCaret token on StreamDesign.Colors, (2)
showing the fix for apps that construct custom StreamDesign.Colors instances
(explicitly add systemCaret with a default/appropriate value), and (3) adding a
short compatibility note and example for copy-7QP4Db0 / the Colors constructor
usage to ensure consumers know to set systemCaret when upgrading.

---

Nitpick comments:
In
`@stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.kt`:
- Around line 60-64: The KDoc for the public data class EditChannel currently
says it’s a rename-only option but the type represents entering the full channel
edit flow; update the KDoc for EditChannel to describe that it opens the
complete channel edit screen/flow (not just rename), and revise the `@param` name
to indicate it’s the current channel name used as the initial value in the edit
flow; ensure the KDoc sits immediately above the public data class
EditChannel(val name: String) : Option so SDK consumers see the corrected
documentation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: f588938d-c213-47be-bc07-223e06182d59

📥 Commits

Reviewing files that changed from the base of the PR and between 8a7a697 and 7e0769d.

⛔ Files ignored due to path filters (7)
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelEditTest_filled.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelEditTest_image_picker_no_remove.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelEditTest_image_picker_with_remove.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelEditTest_placeholder.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelEditTest_saving.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members.png is excluded by !**/*.png
  • stream-chat-android-compose/src/test/snapshots/images/io.getstream.chat.android.compose.ui.channel.info_GroupChannelInfoContentTest_collapsed_members_in_dark_mode.png is excluded by !**/*.png
📒 Files selected for processing (36)
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/channel/DirectChannelInfoActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/channel/GroupChannelInfoActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/chats/ChatsActivity.kt
  • stream-chat-android-compose/api/stream-chat-android-compose.api
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoNameField.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoOptionItem.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoUserInfoOption.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditScreen.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditUtils.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/GroupChannelInfoScreen.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/components/avatar/ChannelAvatar.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactory.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/ChatComponentFactoryParams.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/theme/StreamDesign.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModel.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModelFactory.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/GroupChannelEditViewModel.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/ui/channel/info/GroupChannelEditTest.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModelFactoryTest.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModelTest.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channel/GroupChannelEditViewModelTest.kt
  • stream-chat-android-ui-common/api/stream-chat-android-ui-common.api
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/AddMembersViewAction.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/AddMembersViewController.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/ChannelInfoViewAction.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/ChannelInfoViewController.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/AddMembersViewState.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/state/channel/info/ChannelInfoViewState.kt
  • stream-chat-android-ui-common/src/main/res/values/strings.xml
  • stream-chat-android-ui-common/src/test/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/ChannelInfoViewControllerTest.kt
  • stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/info/ChatInfoExtensions.kt
  • stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/info/ChatInfoFragment.kt
  • stream-chat-android-ui-components-sample/src/main/kotlin/io/getstream/chat/ui/sample/feature/chat/info/group/GroupChatInfoFragment.kt
  • stream-chat-android-ui-components/api/stream-chat-android-ui-components.api
  • stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/channel/ChannelInfoViewModel.kt
  • stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/channel/ChannelInfoViewModelFactory.kt
💤 Files with no reviewable changes (10)
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/channel/DirectChannelInfoActivity.kt
  • stream-chat-android-compose-sample/src/main/java/io/getstream/chat/android/compose/sample/ui/channel/GroupChannelInfoActivity.kt
  • stream-chat-android-ui-common/src/main/kotlin/io/getstream/chat/android/ui/common/feature/channel/info/ChannelInfoViewAction.kt
  • stream-chat-android-compose/src/test/kotlin/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModelFactoryTest.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoUserInfoOption.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/channel/info/ChannelInfoNameField.kt
  • stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/channel/ChannelInfoViewModelFactory.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModelFactory.kt
  • stream-chat-android-ui-components/src/main/kotlin/io/getstream/chat/android/ui/viewmodel/channel/ChannelInfoViewModel.kt
  • stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/viewmodel/channel/ChannelInfoViewModel.kt

@andremion andremion marked this pull request as draft March 27, 2026 16:49
@andremion andremion force-pushed the redesign/AND-1135-redesign-channel-info-edit-screen branch 2 times, most recently from bc7298d to 1be76fe Compare March 30, 2026 09:16
@andremion andremion marked this pull request as ready for review March 30, 2026 10:12
Copy link
Copy Markdown
Contributor

@gpunto gpunto left a comment

Choose a reason for hiding this comment

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

Looks good, left just some minor things

…ns with a single `EditChannel` option in `ChannelInfoViewState`.
…roller. Cancel any in-flight loadMore job when a new search starts, preventing results from a previous query from being appended to the new search results.
…endency from `ChannelInfoViewModel` and `ChannelInfoViewController`.
…ing state from the UI to `GroupChannelEditViewModel`.
…Controller` to cover edge cases.

- Add test to verify that `GroupChannelEditViewModel` ignores duplicate gallery imports while an import is already in progress.
- Add test to ensure `GroupChannelEditViewModel` preserves the existing pending image state if a gallery import fails.
- Add test to confirm that `AddMembersViewController` cancels ongoing `LoadMore` jobs when the search query is changed.
…l` initialization internally.

- Update `GroupChannelEditScreen` to accept `GroupChannelEditViewModelFactory` instead of a pre-initialized `GroupChannelEditViewModel`.
- Move `GroupChannelEditViewModel` creation logic from `GroupChannelInfoScreen` into `GroupChannelEditScreen` using `viewModel()`.
- Wrap `GroupChannelEditPlaceholder` in a `ViewModelStore` and update it to use the new factory-based signature to improve preview reliability.
- Remove unnecessary `GroupChannelEditViewModel` import in `GroupChannelInfoScreen`.
…ViewModelFactory` instantiation.

- Remove `viewModelFactory` parameter from `GroupChannelEditScreen` and internalize its creation using `LocalContext` and the provided `channel.cid`.
- Update `GroupChannelInfoScreen` to no longer pass a factory to `GroupChannelEditScreen`.
- Simplify `GroupChannelEditPlaceholder` by removing redundant factory initialization.
- Provide a default empty lambda for the `onDismiss` parameter in `GroupChannelEditScreen`.
@andremion andremion force-pushed the redesign/AND-1135-redesign-channel-info-edit-screen branch from ffc2720 to e5381da Compare March 31, 2026 07:53
@sonarqubecloud
Copy link
Copy Markdown

@andremion andremion merged commit 4fddf89 into v7 Mar 31, 2026
15 checks passed
@andremion andremion deleted the redesign/AND-1135-redesign-channel-info-edit-screen branch March 31, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:new-feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants