Skip to content

Refactor show sign out confirmation dialogs#3583

Merged
shobhitagarwal1612 merged 11 commits into
masterfrom
refactor-showSignOutConfirmationDialogs
Feb 27, 2026
Merged

Refactor show sign out confirmation dialogs#3583
shobhitagarwal1612 merged 11 commits into
masterfrom
refactor-showSignOutConfirmationDialogs

Conversation

@shobhitagarwal1612

@shobhitagarwal1612 shobhitagarwal1612 commented Feb 27, 2026

Copy link
Copy Markdown
Member

Fixes #3438

This PR resolves, "HomeScreenFragment.showSignOutConfirmationDialogs creates new mutable states and composables on every click, bypassing recomposition entirely."

Verified the changes by opening the user details dialog and adding test coverage.

Screen_recording_20260227_120145.webm

@andreia-ferreira PTAL?

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codecov

codecov Bot commented Feb 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.11%. Comparing base (e8ede9e) to head (e917538).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...oundplatform/android/ui/home/UserAccountDialogs.kt 87.50% 0 Missing and 2 partials ⚠️
...oundplatform/android/ui/home/HomeScreenFragment.kt 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3583      +/-   ##
============================================
+ Coverage     71.09%   71.11%   +0.01%     
- Complexity     1625     1629       +4     
============================================
  Files           337      338       +1     
  Lines          9096     9114      +18     
  Branches       1001     1003       +2     
============================================
+ Hits           6467     6481      +14     
- Misses         2030     2031       +1     
- Partials        599      602       +3     
Files with missing lines Coverage Δ
...undplatform/android/ui/home/HomeScreenViewModel.kt 76.78% <100.00%> (+10.11%) ⬆️
...oundplatform/android/ui/home/HomeScreenFragment.kt 72.00% <90.90%> (-4.53%) ⬇️
...oundplatform/android/ui/home/UserAccountDialogs.kt 87.50% <87.50%> (ø)

... and 1 file with indirect coverage changes

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

Comment thread app/src/main/java/org/groundplatform/android/ui/home/HomeScreenFragment.kt Outdated
Comment thread app/src/main/java/org/groundplatform/android/ui/home/HomeScreenViewModel.kt Outdated
shobhitagarwal1612 and others added 5 commits February 27, 2026 15:16
…nFragment.kt

Co-authored-by: Andreia Ferreira <51242456+andreia-ferreira@users.noreply.github.com>
…onDialogs' into refactor-showSignOutConfirmationDialogs

# Conflicts:
#	app/src/main/java/org/groundplatform/android/ui/home/HomeScreenFragment.kt
@shobhitagarwal1612 shobhitagarwal1612 merged commit 12855f7 into master Feb 27, 2026
9 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the refactor-showSignOutConfirmationDialogs branch February 27, 2026 11:15
hassan-nsubuga pushed a commit to hassan-nsubuga/ground-android that referenced this pull request Mar 2, 2026
hassan-nsubuga added a commit that referenced this pull request Mar 2, 2026
* Add a conditional to e2e test

The CompleteAllTaskTypesTest didn't cover conditional logic. Added a conditional question to the test survey and added tests for it in order to prevent regressions

Closes #3481

* Reformat code

* Refactor to remove conditional test logic

* Refactor to seperate responsibility, move conditional test logic to DataCollectionRobot and add a reusable method to AndroidTestDriver

* Bump com.google.firebase:firebase-bom from 34.9.0 to 34.10.0 (#3582)

Bumps com.google.firebase:firebase-bom from 34.9.0 to 34.10.0.

---
updated-dependencies:
- dependency-name: com.google.firebase:firebase-bom
  dependency-version: 34.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Refactor settings screen to compose (#3574)

* Migrate SettingsActivity to compose
* Migrate SettingsFragment.kt to compose
* Update unit tests
* Remove unused strings
* Decouple data layer from SettingsViewModel

* Exclude Compose previews from Jacoco reports (#3584)

* Refactor show sign out confirmation dialogs (#3583)

* Bump org.mockito:mockito-bom from 5.21.0 to 5.22.0 (#3586)

Bumps [org.mockito:mockito-bom](https://github.com/mockito/mockito) from 5.21.0 to 5.22.0.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](mockito/mockito@v5.21.0...v5.22.0)

---
updated-dependencies:
- dependency-name: org.mockito:mockito-bom
  dependency-version: 5.22.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Rename variable to have a more conventional name

* Create MultipleChoiceType sealed class to represent the kind of multiple choice questions being handled, Refactor DataCollectionRobot to use the new sealed class

* Refactor to rename test constants to more descriptive names to give  context about the tests

* Reformat code to pass a code format check

* Refactor to make constant names descriptive

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nsubuga <nsubugahassan@gmail.com>
Co-authored-by: Andreia Ferreira <51242456+andreia-ferreira@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Shobhit Agarwal <ashobhit@google.com>
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.

[Code health] Refactor HomeScreenFragment.showSignOutConfirmationDialogs implementation

2 participants