Skip to content

Add playlist from episode details#4923

Merged
MiSikora merged 5 commits intomainfrom
mehow/task/add-from-details
Jan 29, 2026
Merged

Add playlist from episode details#4923
MiSikora merged 5 commits intomainfrom
mehow/task/add-from-details

Conversation

@MiSikora
Copy link
Copy Markdown
Contributor

Description

This allows to add episode to a playlist from episode details view.

Closes PCDROID-412

Testing Instructions

  1. Open episode details.
  2. Tap "Add".
  3. Tap "Playlist".
  4. Adding to an existing playlist should show a snackbar message.
  5. Creating a new playlist should navigate to it.
  6. Check that the adding to playlists flow uses episode_details analytics value source.

Screenshots or Screencast

A B
image image

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.5 milestone Jan 27, 2026
@MiSikora MiSikora requested a review from a team as a code owner January 27, 2026 13:35
@MiSikora MiSikora requested review from Copilot and geekygecko and removed request for a team January 27, 2026 13:35
@MiSikora MiSikora added [Type] Feature Adding a new feature. [Area] Playlists labels Jan 27, 2026
Comment thread CHANGELOG.md Outdated
Copy link
Copy Markdown
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 adds the ability to add an episode to a playlist directly from the episode details screen. Previously, this functionality was only available from other screens like the shelf.

Changes:

  • Refactored the "Add to Up Next" button to become a general "Add" button that shows a menu with options to add to Up Next (top/bottom) or to a playlist
  • Updated string resources to improve capitalization consistency for "Up Next" references
  • Added infrastructure for showing snackbars in dialog contexts by adding snackBarView() method to BaseDialogFragment and closeDialogs() to FragmentHostListener

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/services/views/src/main/java/au/com/shiftyjelly/pocketcasts/views/swipe/AddToPlaylistFragmentFactory.kt Added new EpisodeDetails source for analytics tracking when adding to playlist from episode details
modules/services/views/src/main/java/au/com/shiftyjelly/pocketcasts/views/fragments/BaseDialogFragment.kt Added snackBarView() method to support showing snackbars in dialogs
modules/services/ui/src/main/java/au/com/shiftyjelly/pocketcasts/ui/helper/FragmentHostListener.kt Added closeDialogs() method to the interface for closing all dialogs
modules/services/localization/src/main/res/values/strings.xml Updated "Up Next" string capitalization for consistency and added new "Add" button label
modules/features/podcasts/src/main/res/layout/fragment_episode_container.xml Added CoordinatorLayout for snackbar display in episode details
modules/features/podcasts/src/main/res/layout/fragment_episode.xml Renamed button ID from btnAddToUpNext to btnAddEpisode to reflect new functionality
modules/features/podcasts/src/main/res/layout-land/fragment_episode.xml Updated landscape layout with renamed button and constraint references
modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/episode/EpisodeFragmentViewModel.kt Refactored Up Next logic into separate methods (addToUpNextTop(), addToUpNextBottom(), removeFromUpNext()) and removed reactive Up Next state tracking
modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/episode/EpisodeFragment.kt Replaced toggle button behavior with menu dialog showing Up Next and playlist options
modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/episode/EpisodeContainerFragment.kt Implemented snackBarView() to return the CoordinatorLayout for snackbar display
modules/features/filters/src/main/java/au/com/shiftyjelly/pocketcasts/playlists/manual/AddToPlaylistFragment.kt Added closeDialogs() call to close episode details when navigating to newly created playlist
app/src/main/java/au/com/shiftyjelly/pocketcasts/ui/MainActivity.kt Implemented closeDialogs() and updated snackBarView() to check for dialog-specific snackbar views
CHANGELOG.md Added entry documenting the new feature
Comments suppressed due to low confidence (1)

modules/features/podcasts/src/main/res/layout-land/fragment_episode.xml:116

  • The btnAddEpisode button in the landscape layout is missing the android:contentDescription attribute that is present in the portrait layout. For consistency and accessibility, add android:contentDescription="@string/podcasts_add_episode" to this view.
        <au.com.shiftyjelly.pocketcasts.podcasts.view.episode.ToggleActionButton
            android:id="@+id/btnAddEpisode"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            tools:background="@tools:sample/avatars"
            app:layout_constraintStart_toEndOf="@+id/btnDownload"
            app:layout_constraintEnd_toStartOf="@+id/btnPadding"
            app:layout_constraintTop_toTopOf="@+id/btnDownload"
            app:layout_constraintHorizontal_chainStyle="packed" />

Copilot AI review requested due to automatic review settings January 27, 2026 14:23
@MiSikora MiSikora force-pushed the mehow/task/add-from-details branch from 9af0acc to 7d6c862 Compare January 27, 2026 14:23
Copy link
Copy Markdown
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

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

Comments suppressed due to low confidence (1)

modules/features/podcasts/src/main/res/layout-land/fragment_episode.xml:116

  • The landscape layout is missing the android:contentDescription attribute for the btnAddEpisode button. Add android:contentDescription="@string/podcasts_add_episode" to match the portrait layout and ensure proper accessibility support with TalkBack.
        <au.com.shiftyjelly.pocketcasts.podcasts.view.episode.ToggleActionButton
            android:id="@+id/btnAddEpisode"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            tools:background="@tools:sample/avatars"
            app:layout_constraintStart_toEndOf="@+id/btnDownload"
            app:layout_constraintEnd_toStartOf="@+id/btnPadding"
            app:layout_constraintTop_toTopOf="@+id/btnDownload"
            app:layout_constraintHorizontal_chainStyle="packed" />

@CookieyedCodes
Copy link
Copy Markdown

Could we have a long press to do a spefic command in settings?
That would keep the behaviour fast if the user wanted it

Copy link
Copy Markdown
Member

@geekygecko geekygecko left a comment

Choose a reason for hiding this comment

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

It's awesome to have this feature, thanks for adding it!

A minor detail, the action button text in the snackbar appears greyed out. I couldn't find an easy way to change it but it would be good if it matched other areas of the app if possible.

Image Image

Copilot AI review requested due to automatic review settings January 29, 2026 07:16
Copy link
Copy Markdown
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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

@MiSikora MiSikora merged commit 02994f5 into main Jan 29, 2026
24 checks passed
@MiSikora MiSikora deleted the mehow/task/add-from-details branch January 29, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants