Migrate search events to Event Horizon#5107
Open
MiSikora wants to merge 1 commit intomehow/task/event-horizon-settings-5from
Open
Migrate search events to Event Horizon#5107MiSikora wants to merge 1 commit intomehow/task/event-horizon-settings-5from
MiSikora wants to merge 1 commit intomehow/task/event-horizon-settings-5from
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the analytics migration in the search flow by replacing legacy AnalyticsTracker events with EventHorizon equivalents, and updates related view models/tests accordingly.
Changes:
- Migrate search/search-history tracking calls from
AnalyticsTrackertoEventHorizonevents. - Introduce EventHorizon type mappings for search history entries and search result/filter types.
- Update fragment argument passing in
SearchResultsFragmentto use a@Parcelizeargs object and enable the parcelize plugin.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/to/SearchHistoryEntry.kt | Adds EventHorizon search-history type mapping on entries. |
| modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchViewModel.kt | Replaces legacy analytics calls with EventHorizon search events and adds enum mappings. |
| modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchHandler.kt | Switches “search performed/failed” tracking to EventHorizon. |
| modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchFragment.kt | Replaces AnalyticsTracker usage with EventHorizon for search clear + shown/dismissed tracking. |
| modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchResultsFragment.kt | Moves to Parcelize-based arguments and removes stringly-typed args. |
| modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/searchhistory/SearchHistoryViewModel.kt | Switches search history tracking to EventHorizon events. |
| modules/features/search/src/test/java/au/com/shiftyjelly/pocketcasts/search/SearchViewModelTest.kt | Updates test wiring to match the new EventHorizon-based constructor. |
| modules/features/search/src/test/java/au/com/shiftyjelly/pocketcasts/search/searchhistory/SearchHistoryViewModelTest.kt | Updates test wiring to use EventHorizon(TestEventSink()). |
| modules/features/search/build.gradle.kts | Adds kotlin-parcelize plugin for the new args class. |
| modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/ProfileEpisodeListViewModel.kt | Migrates search tracking to EventHorizon in profile episode list search. |
| modules/features/podcasts/src/test/java/au/com/shiftyjelly/pocketcasts/podcasts/view/ProfileEpisodeListViewModelTest.kt | Updates test wiring after removing AnalyticsTracker dependency. |
| modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/onboarding/recommendations/OnboardingRecommendationsSearchViewModel.kt | Replaces shown/dismissed search tracking with EventHorizon events. |
| gradle/libs.versions.toml | Bumps the EventHorizon dependency revision. |
modules/features/search/src/main/java/au/com/shiftyjelly/pocketcasts/search/SearchHandler.kt
Show resolved
Hide resolved
...ts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/ProfileEpisodeListViewModel.kt
Outdated
Show resolved
Hide resolved
.../src/main/java/au/com/shiftyjelly/pocketcasts/search/searchhistory/SearchHistoryViewModel.kt
Outdated
Show resolved
Hide resolved
Collaborator
Project dependencies changeslist! Upgraded Dependencies
com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804, (changed from pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746)tree +--- project :modules:features:account
| \--- project :modules:features:search
| \--- project :modules:services:analytics
-| +--- com.automattic:eventhorizon:pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746
+| +--- com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804
| +--- project :modules:services:model
-| | +--- com.automattic:eventhorizon:pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746 (*)
+| | +--- com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804 (*)
| | \--- project :modules:services:utils
| | \--- project :modules:services:payment
-| | \--- com.automattic:eventhorizon:pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746 (*)
+| | \--- com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804 (*)
| \--- project :modules:services:preferences
-| \--- com.automattic:eventhorizon:pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746 (*)
+| \--- com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804 (*)
+| \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.3.10 (*)
\--- project :modules:features:discover
\--- project :modules:features:podcasts
\--- project :modules:features:player
\--- project :modules:features:transcripts
\--- project :modules:services:sharing
- \--- com.automattic:eventhorizon:pocket-casts-7ed2344c715d2a021b2452175ed89ef98b710746 (*)
+ \--- com.automattic:eventhorizon:pocket-casts-6b9b4f1eff701ae6d519a665f886d4899211b804 (*) |
591ff03 to
b3c7437
Compare
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.
Description
This migrates search related events to Event Horizon.
Relates to PCDROID-419
Testing Instructions
I would mostly focus on the code review and smoke test some of these events as the migration process is rather a mechanical one.
search_shownsearch_dismissedsearch_performedsearch_failedsearch_result_tappedsearch_clearedsearch_list_shownsearch_history_clearedsearch_history_item_tappedsearch_history_item_delete_button_tappedsearch_filter_tappedsearch_predictive_shownsearch_predictive_failedsearch_predictive_term_tappedsearch_empty_resultssearch_predictive_view_all_tappedScreenshots or Screencast
N/A
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...