Skip to content

MBL-2793: Search integrated within HomeActivity as navigation destination#2466

Merged
Arkariang merged 9 commits intomasterfrom
imartin/MBL-2793-small
Feb 5, 2026
Merged

MBL-2793: Search integrated within HomeActivity as navigation destination#2466
Arkariang merged 9 commits intomasterfrom
imartin/MBL-2793-small

Conversation

@Arkariang
Copy link
Contributor

@Arkariang Arkariang commented Jan 26, 2026

📲 What

  • Refactored SearchAndFilter to hold a parent composable
@Composable
fun SearchAndFilterScreen(
    env: Environment,
    filterMenuVM: FilterMenuViewModel,
    searchViewModel: SearchAndFilterViewModel,
    onBackClicked: () -> Unit = {},
    preLaunchedCallback: (project: Project, reftag: RefTag) -> Unit = { a, b -> }

This parent composable is able to be loaded in HomeScreen as navigation destination as the same time as keeping it on SearchAndFilter activity.

🤔 Why

  • New HomeScreen using bottomNavigation + navigation library is able to re-use SearchAndFilter already exiting UI + busines logic

🛠 How

  • Parent composable with VM's and callback actions as dependencies

👀 See

Screen_recording_20260121_165530.mp4

| | |

📋 QA

  • Make sure the search experience from Discovery has not suffered any regression. Just search a bit accessing it from Discovery screen.
  • Play around with it on HomeScreen :)

Story 📖

MBL-2793

@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2026

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 8.91089% with 92 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.70%. Comparing base (92e2056) to head (f4e64ac).

Files with missing lines Patch % Lines
...arter/ui/activities/compose/search/SearchScreen.kt 0.00% 88 Missing ⚠️
...r/features/home/ui/components/FloatingBottomNav.kt 55.55% 2 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2466      +/-   ##
============================================
- Coverage     64.75%   64.70%   -0.06%     
- Complexity     2416     2420       +4     
============================================
  Files           382      382              
  Lines         28938    29017      +79     
  Branches       4176     4197      +21     
============================================
+ Hits          18740    18775      +35     
- Misses         7924     7975      +51     
+ Partials       2274     2267       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Arkariang Arkariang marked this pull request as ready for review January 26, 2026 23:03
@Arkariang Arkariang requested a review from tonyteate January 26, 2026 23:03
when (tab) {
is Tab.Search -> {
composable(tab.route) {
SearchAndFilterScreen(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Integrating the newly created SearchAndFilterScreen as navigation destination by utilizing the same Composable and ViewModel pair currently used in SearchAndFilterActivity, we are ensuring feature parity while initiating our transition away from Activity-based navigation. This represents the first step in our long-term strategy to adopt a modern, Compose-driven navigation architecture.

@Arkariang Arkariang requested a review from jlpl15 January 27, 2026 16:52
@Arkariang Arkariang changed the title MBL-2793: Search integrated within as navigation destination MBL-2793: Search integrated within HomeActivity as navigation destination Jan 27, 2026
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice idea to make these reusable 🙏

}

@Composable
private fun setUpErrorActions(snackbarHostState: SnackbarHostState): (String?) -> Job {
Copy link
Contributor

@tonyteate tonyteate Feb 2, 2026

Choose a reason for hiding this comment

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

Couple of small things here:

  • Can we include the TODO from L161 of SearchAndFilterActivity about the stacking snackbars in case we ever get a chance to update it 😄
  • Perhaps a nit: A return type of Job is very particular, and in this case since we won't be acting on the Job, just invoking the lambda, it may be clearer if we exclude it. We could explicitly define the return type for the lambda, errorAction: (String?) -> Unit = ..., and then the same for the whole function setUpErrorActions().

tonyteate
tonyteate previously approved these changes Feb 2, 2026
Copy link
Contributor

@tonyteate tonyteate left a comment

Choose a reason for hiding this comment

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

Amazing! 🎉

@Arkariang Arkariang merged commit 1b44963 into master Feb 5, 2026
3 checks passed
@Arkariang Arkariang deleted the imartin/MBL-2793-small branch February 5, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants