Skip to content

Migrate home screen drawer to Compose#3554

Open
gino-m wants to merge 22 commits intomasterfrom
refactor/home-drawer
Open

Migrate home screen drawer to Compose#3554
gino-m wants to merge 22 commits intomasterfrom
refactor/home-drawer

Conversation

@gino-m
Copy link
Collaborator

@gino-m gino-m commented Feb 16, 2026

Towards #3487

Screen_recording_20260216_154137.webm

@auto-assign auto-assign bot requested a review from anandwana001 February 16, 2026 20:07
@gemini-code-assist
Copy link
Contributor

gemini-code-assist bot commented Feb 16, 2026

Summary of Changes

Hello @gino-m, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the Android application's architecture by refactoring the home navigation drawer into a standalone Composable, promoting better code structure and reusability. Concurrently, it establishes the necessary infrastructure for Hilt-based instrumented testing, which will enable more robust and maintainable tests for UI components. Minor documentation improvements and the removal of an obsolete agent skill are also included.

Highlights

  • Home Drawer Refactoring: The application's home navigation drawer has been refactored into a dedicated HomeDrawer Composable function, improving modularity and organization of the UI code.
  • Hilt Instrumented Test Setup: The project now includes configuration for Hilt-based instrumented tests, featuring a new CustomTestRunner to facilitate dependency injection within the test environment.
  • Skill Removal: The fetch_pr_comments skill, including its documentation and Python script, has been removed from the .agent/skills directory.
  • Documentation Update: The CONTRIBUTING.md file has been updated to clarify and reorder instructions related to setting up Google Maps API keys.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .agent/skills/fetch_pr_comments/SKILL.md
    • Removed the skill documentation file.
  • CONTRIBUTING.md
    • Reordered and clarified the section for adding Google Maps API keys.
  • app/build.gradle
    • Updated the testInstrumentationRunner to org.groundplatform.android.CustomTestRunner.
    • Added androidTestImplementation libs.androidx.ui.test.junit4 dependency.
  • app/src/androidTest/java/org/groundplatform/android/CustomTestRunner.kt
    • Added a new custom AndroidJUnitRunner to integrate Hilt with instrumented tests.
  • app/src/main/java/org/groundplatform/android/ui/home/HomeDrawer.kt
    • Added a new Composable function, HomeDrawer, to encapsulate the UI and logic for the application's navigation drawer.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request refactors the home navigation drawer into a Jetpack Compose component and sets up a custom test runner for Hilt-based instrumented tests. The new HomeDrawer implementation is well-structured and follows Material 3 guidelines. I have identified a few minor issues related to accessibility (redundant content descriptions), UX (misleading ripple effects on non-interactive items), and touch target sizes that should be addressed to improve the overall quality and usability of the component.

@gino-m gino-m changed the title Refactor home drawer Migrate home screen drawer to Compose Feb 16, 2026
@gino-m gino-m requested review from andreia-ferreira and removed request for anandwana001 February 16, 2026 20:39
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 82.84519% with 41 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.06%. Comparing base (a92596d) to head (1bc876c).

Files with missing lines Patch % Lines
...a/org/groundplatform/android/ui/home/HomeDrawer.kt 80.24% 21 Missing and 11 partials ⚠️
...oundplatform/android/ui/home/HomeScreenFragment.kt 87.93% 5 Missing and 2 partials ⚠️
...undplatform/android/ui/home/HomeScreenViewModel.kt 89.47% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3554      +/-   ##
============================================
+ Coverage     71.03%   71.06%   +0.02%     
+ Complexity     1631     1630       -1     
============================================
  Files           331      332       +1     
  Lines          8956     9116     +160     
  Branches        998     1015      +17     
============================================
+ Hits           6362     6478     +116     
- Misses         1998     2032      +34     
- Partials        596      606      +10     
Files with missing lines Coverage Δ
...undplatform/android/ui/home/HomeScreenViewModel.kt 74.13% <89.47%> (+7.47%) ⬆️
...oundplatform/android/ui/home/HomeScreenFragment.kt 74.46% <87.93%> (-2.06%) ⬇️
...a/org/groundplatform/android/ui/home/HomeDrawer.kt 80.24% <80.24%> (ø)

... and 2 files with indirect coverage changes

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

gino-m and others added 19 commits February 22, 2026 17:55
…r.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…r.kt

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Refactor HomeScreenFragment to reduce method length
- Refactor HomeDrawer to extract composables
- Migrate HomeScreenViewModel dialog state to StateFlow
- Initialize WorkManager in HomeScreenFragmentTest
- Ignore flaky sign out dialog test in Robolectric
- Fix static analysis issues (detekt, ktfmt)
- Introduce `HomeDrawerAction` sealed interface to represent navigation and sign-out events.
- Update `HomeDrawer` to expose a single `onAction` callback instead of multiple parameters.
- Consolidate navigation logic in `HomeScreenFragment` within the `onAction` handler.
Copy link
Collaborator

@andreia-ferreira andreia-ferreira left a comment

Choose a reason for hiding this comment

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

Just to confirm: there are some differences in the UI (eg. the order of the menu items, horizontal dividers look different etc) is this an intended change along with the compose refactor?

Before After
Image Image

*
* This is required for Hilt dependency injection to work correctly in instrumented tests.
*/
class CustomTestRunner : AndroidJUnitRunner() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

as far as I see this file is not being used and can be removed

implementation libs.androidx.ui.tooling.preview.android
stagingImplementation libs.androidx.ui.test.manifest
testImplementation libs.androidx.ui.test.junit4
androidTestImplementation libs.androidx.ui.test.junit4
Copy link
Collaborator

Choose a reason for hiding this comment

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

This and L93 are not needed I believe


@Preview(showBackground = true)
@Composable
fun HomeDrawerPreview() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this could be private to avoid unintended usage

Comment on lines +48 to +49
val user: org.groundplatform.android.model.User,
val survey: org.groundplatform.android.model.Survey?,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: imports could be simplified

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.

2 participants