Skip to content

Migrate search events to Event Horizon#5107

Open
MiSikora wants to merge 1 commit intomehow/task/event-horizon-settings-5from
mehow/task/event-horizon-search
Open

Migrate search events to Event Horizon#5107
MiSikora wants to merge 1 commit intomehow/task/event-horizon-settings-5from
mehow/task/event-horizon-search

Conversation

@MiSikora
Copy link
Contributor

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_shown
  • search_dismissed
  • search_performed
  • search_failed
  • search_result_tapped
  • search_cleared
  • search_list_shown
  • search_history_cleared
  • search_history_item_tapped
  • search_history_item_delete_button_tapped
  • search_filter_tapped
  • search_predictive_shown
  • search_predictive_failed
  • search_predictive_term_tapped
  • search_empty_results
  • search_predictive_view_all_tapped

Screenshots or Screencast

N/A

Checklist

  • If this is a user-facing change, I have added an entry in CHANGELOG.md
  • Ensure the linter passes (./gradlew spotlessApply to automatically apply formatting/linting)
  • I have considered whether it makes sense to add tests for my changes
  • All strings that need to be localized are in modules/services/localization/src/main/res/values/strings.xml
  • Any jetpack compose components I added or changed are covered by compose previews
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

I have tested any UI changes...

  • with different themes
  • with a landscape orientation
  • with the device set to have a large display and font size
  • for accessibility with TalkBack

@MiSikora MiSikora added this to the 8.8 milestone Mar 11, 2026
@MiSikora MiSikora requested a review from a team as a code owner March 11, 2026 10:48
@MiSikora MiSikora added the [Area] Analytics Analytics related issues label Mar 11, 2026
@MiSikora MiSikora requested review from geekygecko and removed request for a team March 11, 2026 10:48
@MiSikora MiSikora added do not merge [Type] Enhancement Improve an existing feature. labels Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 10:48
@dangermattic
Copy link
Collaborator

1 Error
🚫 This PR is tagged with do not merge label(s).

Generated by 🚫 Danger

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 AnalyticsTracker to EventHorizon events.
  • Introduce EventHorizon type mappings for search history entries and search result/filter types.
  • Update fragment argument passing in SearchResultsFragment to use a @Parcelize args 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.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 11, 2026

Project dependencies changes

list
! 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 (*)

@MiSikora MiSikora force-pushed the mehow/task/event-horizon-search branch from 591ff03 to b3c7437 Compare March 11, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Analytics Analytics related issues do not merge [Type] Enhancement Improve an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants