Repository navigation
Remove the search module's dependency on other feature modules - #1271
Merged
Merged
Conversation
dturner
force-pushed
the
dt/remove-feature-dep
branch
from
March 11, 2024 21:12
ceefc09 to
9fe8044
Compare
JoseAlcerreca
approved these changes
Mar 14, 2024
Change-Id: I17df9948fed04ddc7ba507b437d39536b8b180bb
Change-Id: Ib6aa372a1ab3b13b5c69c1d3feec2c31e5dca3ce
Change-Id: Ide4cb90abc2ae7ca78488909a37df685c2e71ec6
Change-Id: I5b08ce68522c59cdd7f7ec56a14a7ebc8b3868cd
dturner
force-pushed
the
dt/remove-feature-dep
branch
from
March 14, 2024 17:38
6319254 to
b5bfe44
Compare
Change-Id: Ia2fe3f339b26bf64dd965fc1aa58a957cb7c7f93
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I have done and why
The
:feature:searchmodule depended on the:feature:foryou,:feature:bookmarksand:feature:interestsmodules.It is bad practice for
:featuremodules to depend on other feature modules. Common functionality should be abstracted into:coremodules and shared between those feature modules. This makes it clear what is unique to a given feature, and what is shared.With this in mind I have:
SearchScreencomposable to accept only a single view modelSearchViewModel(it previously required anInterestsViewModeland aBookmarksViewModel).SearchViewModel. I considered adding use cases for these but decided that since there is zero logic involved (they are one-line calls to repository methods) it keeps things simple to just add them directly.InterestsIteminto:core:uiso it can be shared between the:feature:interestsand:feature:searchmodules.Fixes #707
Related #810
:feature:searchDependency graph