Skip to content

Fix nav bar visibility when searching in add members view#1499

Open
martinmitrevski wants to merge 2 commits into
developfrom
search-add-members-fix
Open

Fix nav bar visibility when searching in add members view#1499
martinmitrevski wants to merge 2 commits into
developfrom
search-add-members-fix

Conversation

@martinmitrevski

@martinmitrevski martinmitrevski commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

πŸ”— Issue Links

Resolves https://linear.app/stream/issue/IOS-1750/swiftui-cant-add-members-with-search.

🎯 Goal

Describe why we are making this change.

πŸ“ Summary

Provide bullet points with the most important changes in the codebase.

πŸ›  Implementation

Provide a detailed description of the implementation and explain your decisions if you find them relevant.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

πŸ§ͺ Manual Testing Notes

Explain how this change can be tested manually, if applicable.

β˜‘οΈ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

Summary by CodeRabbit

  • Refactor
    • Reorganized the add-members channel member search UI with a dedicated search bar above the results list for a clearer, more consistent experience.
  • Bug Fixes
    • Fixed an issue where the navigation bar and its buttons could disappear while searching on the add members screen.

@martinmitrevski martinmitrevski requested a review from a team as a code owner June 19, 2026 13:00
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 334a2e61-9c72-421e-bdfe-f30e2f564a59

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 0b60c92 and 5daca1e.

πŸ“’ Files selected for processing (1)
  • CHANGELOG.md

πŸ“ Walkthrough

Walkthrough

In MemberAddView, the SwiftUI .searchable modifier (via makeSearchableModifier) is replaced with an explicit SearchBar view. The existing ScrollView/LazyVStack/ForEach user list is now wrapped in a VStack with SearchBar placed above it, both bound to viewModel.searchText. The changelog is updated to document that the navigation bar remains visible while searching.

Changes

MemberAddView Search Input Replacement

Layer / File(s) Summary
SearchBar replaces searchable modifier
Sources/StreamChatSwiftUI/ChatChannel/ChannelInfo/MemberAddView.swift, CHANGELOG.md
The body layout changes from a bare ScrollView with makeSearchableModifier to a VStack containing an explicit SearchBar bound to viewModel.searchText above the unchanged user list rendering. Changelog documents the fix for navigation bar visibility preservation during search.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • laevandus

Poem

πŸ‡ A search bar hops into the view,
No more modifier hiding from you!
The VStack wraps it snug and tight,
viewModel.searchText bound just right.
Navigation shows while we searchβ€”hooray! πŸ₯•

πŸš₯ Pre-merge checks | βœ… 5
βœ… Passed checks (5 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately summarizes the main change: fixing navigation bar visibility when searching in the add members view, which aligns with the restructured UI and CHANGELOG entry.
Docstring Coverage βœ… Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch search-add-members-fix

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.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

SDK Size

title develop branch diff status
StreamChatSwiftUI 8.25 MB 8.25 MB 0 KB 🟒

@Stream-SDK-Bot

Copy link
Copy Markdown
Collaborator

StreamChatSwiftUI XCSize

Object Diff (bytes)
MemberAddView.o +328
Styles.o -52
SearchBar.o -52

Comment on lines -60 to -62
.modifier(factory.styles.makeSearchableModifier(
options: SearchableModifierOptions(searchText: $viewModel.searchText)
))

@nuno-vieira nuno-vieira Jun 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would prefer we keep the search modifier, we just need to improve it. This change is kinda of a breaking change in terms of behaviour. It seems to me that the ideal fix is to modify the DefaultSearchModifier with this:

.searchable(
    text: $searchText,
    placement: .navigationBarDrawer(displayMode: .automatic),
    prompt: Text(prompt)
)
.searchPresentationToolbarBehavior(.avoidHidingContent)

This is only supported on iOS 17.1, but we can change the current version to 17.1 instead of 17.0, then it falls back to a manual implementation (What this PR is doing)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants