Skip to content

Migrate up next events to Event Horizon#5087

Open
MiSikora wants to merge 2 commits intomainfrom
mehow/task/event-horizon-upnext
Open

Migrate up next events to Event Horizon#5087
MiSikora wants to merge 2 commits intomainfrom
mehow/task/event-horizon-upnext

Conversation

@MiSikora
Copy link
Contributor

@MiSikora MiSikora commented Mar 6, 2026

Description

This migrates Up Next 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.

  • mini_player_long_press_menu_shown
  • mini_player_long_press_menu_option_tapped
  • mini_player_long_press_menu_dismissed
  • up_next_shown
  • up_next_queue_cleared
  • up_next_now_playing_tapped
  • up_next_queue_episode_tapped
  • up_next_queue_episode_long_pressed
  • up_next_multi_select_entered
  • up_next_select_all_tapped
  • up_next_multi_select_exited
  • up_next_queue_reordered
  • up_next_dismissed
  • up_next_shuffle_enabled
  • up_next_discover_button_tapped
  • up_next_sort

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 6, 2026
@MiSikora MiSikora requested a review from a team as a code owner March 6, 2026 08:44
@MiSikora MiSikora requested review from geekygecko and removed request for a team March 6, 2026 08:44
@MiSikora MiSikora added [Area] Analytics Analytics related issues do not merge [Type] Enhancement Improve an existing feature. labels Mar 6, 2026
Copilot AI review requested due to automatic review settings March 6, 2026 08:45
@wpmobilebot
Copy link
Collaborator

Project dependencies changes

list
! Upgraded Dependencies
com.automattic:eventhorizon:pocket-casts-307016d85d064ca163542173f03157c6a947a081, (changed from pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593)
tree
 +--- project :modules:features:account
 |    \--- project :modules:features:search
 |         \--- project :modules:services:analytics
-|              +--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593
+|              +--- com.automattic:eventhorizon:pocket-casts-307016d85d064ca163542173f03157c6a947a081
 |              \--- project :modules:services:model
-|                   +--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)
+|                   +--- com.automattic:eventhorizon:pocket-casts-307016d85d064ca163542173f03157c6a947a081 (*)
 |                   \--- project :modules:services:utils
 |                        \--- project :modules:services:payment
-|                             \--- com.automattic:eventhorizon:pocket-casts-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)
+|                             \--- com.automattic:eventhorizon:pocket-casts-307016d85d064ca163542173f03157c6a947a081 (*)
 \--- 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-1ad1c1e10ce653841ecae96e6df1f9af7f7ea593 (*)
+                         \--- com.automattic:eventhorizon:pocket-casts-307016d85d064ca163542173f03157c6a947a081 (*)

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

Migrates Up Next / mini-player Up Next related analytics from the legacy AnalyticsTracker events/properties approach to strongly-typed Event Horizon events (PCDROID-419), aligning tracking across UI entry points (mini player, player, Up Next surfaces).

Changes:

  • Replaced legacy analytics tracking for Up Next + mini player long-press menu events with Event Horizon event types across ViewModels, fragments, adapters, and dialogs.
  • Updated UpNextSource and UpNextSortType to carry Event Horizon enums (instead of string analytics values) and wired those through tracking calls.
  • Bumped the eventhorizon dependency version to include the needed event types.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/services/repositories/src/main/java/au/com/shiftyjelly/pocketcasts/repositories/playback/UpNextQueue.kt Updates UpNextSource to expose an Event Horizon source enum for typed event payloads.
modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/type/UpNextSortType.kt Replaces string analytics sort value with Event Horizon sort enum for UpNextSortEvent.
modules/features/player/src/test/java/au/com/shiftyjelly/pocketcasts/player/viewmodel/UpNextViewModelTest.kt Switches test setup from AnalyticsTracker.test() to EventHorizon(TestEventSink()).
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/viewmodel/UpNextViewModel.kt Migrates sort tracking to UpNextSortEvent via EventHorizon.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/viewmodel/PlayerViewModel.kt Plumbs EventHorizon into ClearUpNextDialog creation.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/dialog/MiniPlayerDialog.kt Migrates mini player long-press menu shown/option/dismissed tracking to Event Horizon.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/dialog/ClearUpNextDialog.kt Migrates Up Next queue cleared tracking to UpNextQueueClearedEvent.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/UpNextFragment.kt Migrates Up Next events (shown, reorder, multi-select, select-all, discover) to Event Horizon and refactors args handling via @Parcelize.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/UpNextAdapter.kt Migrates row/footer interactions (episode tap/long-press, shuffle, now playing tap) to Event Horizon events.
modules/features/player/src/main/java/au/com/shiftyjelly/pocketcasts/player/view/PlayerContainerFragment.kt Migrates Up Next shown/dismissed events for the NOW_PLAYING/player entry points.
gradle/libs.versions.toml Updates Event Horizon dependency revision.
app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt Migrates Up Next shown/dismissed tracking for the bottom-sheet Up Next flow to Event Horizon.

@MiSikora MiSikora force-pushed the mehow/task/event-horizon-discover branch from 595b477 to aec0e7c Compare March 9, 2026 09:45
Base automatically changed from mehow/task/event-horizon-discover to main March 9, 2026 10:21
@MiSikora MiSikora force-pushed the mehow/task/event-horizon-upnext branch from 96c90fd to 71c07be Compare March 9, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants