Skip to content

Conversation

@rachaelblue
Copy link
Collaborator

No description provided.

@rachaelblue rachaelblue marked this pull request as ready for review November 25, 2025 20:20
@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 0% with 95 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.28%. Comparing base (e654765) to head (7de3dcf).
⚠️ Report is 36 commits behind head on develop.

Files with missing lines Patch % Lines
...zationSettings/LocalizationSettingsViewModel.swift 0.00% 33 Missing ⚠️
...ner/PersonalizedToolsDomainLayerDependencies.swift 0.00% 16 Missing ⚠️
...es/GetLocalizationSettingsCountryListUseCase.swift 0.00% 14 Missing ⚠️
...ain/UseCases/ViewLocalizationSettingsUseCase.swift 0.00% 13 Missing ⚠️
...esInLocalizationSettingsCountriesListUseCase.swift 0.00% 10 Missing ⚠️
...alizationSettingsInterfaceStringsDomainModel.swift 0.00% 3 Missing ⚠️
...ocalizationSettings/LocalizationSettingsView.swift 0.00% 3 Missing ⚠️
godtools/App/Flows/Menu/MenuFlow.swift 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2867      +/-   ##
===========================================
+ Coverage    53.49%   54.28%   +0.79%     
===========================================
  Files         1343     1353      +10     
  Lines        66308    67121     +813     
===========================================
+ Hits         35471    36437     +966     
+ Misses       30837    30684     -153     

☔ 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.

Copy link
Collaborator

@levieggertcru levieggertcru left a comment

Choose a reason for hiding this comment

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

Hey @rachaelblue looking good. I left a couple notes that are up to you if you want to change. Let me know your thoughts on those notes I left.
For the strings domain model and expose that directly to the View so you don't have to perform additional mapping.

import Foundation
import Combine

class ViewLocalizationSettingsUseCase {
Copy link
Collaborator

@levieggertcru levieggertcru Nov 26, 2025

Choose a reason for hiding this comment

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

Just a note and no change is needed here, I noticed in MPDX my use cases became smaller because it was easier to encapsulate smaller pieces of the business logic. It will all depend on how complex the use case gets.

private let getCurrentAppLanguageUseCase: GetCurrentAppLanguageUseCase
private let getCountryListUseCase: GetLocalizationSettingsCountryListUseCase
private let searchCountriesUseCase: SearchCountriesInLocalizationSettingsCountriesListUseCase
private let viewLocalizationSettingsUseCase: ViewLocalizationSettingsUseCase
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also just a note, if you don't have to store the use case I'm fine with omitting it here since it will be bound to the scope of the init because of the cancellables reference.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doesn't the cancellable hold onto the subscriber separately though? So the use case could still get deallocated if we remove this reference, even though the subscriber is alive?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, I believe you're right. The UseCase would get deallocated, however the publisher returned from the UseCase would still be alive as long as the cancellable is alive.
I don't think it would cause any issues still since the UseCase isn't holding anything that is mutable. Let's just leave the UseCase referenced for now. I'd like to do some research a little more on this one.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok interesting. Curious to know how that works!

@rachaelblue rachaelblue merged commit a66f861 into develop Dec 5, 2025
5 checks passed
@rachaelblue rachaelblue deleted the GT-2839-Localization-Settings-domain-layer branch December 5, 2025 19:15
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