Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Up Next History - Show episode details and restore #3797

Merged
merged 17 commits into from
Mar 24, 2025

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Mar 20, 2025

Description

This displays episodes within "Up Next" history and allows restoring them into the "Up Next" queue.

Testing Instructions

Test.1 Restore "Up Next"

  1. Repeat steps from Test.1 in Up Next History - Snapshot and display history entries #3796 to create a snapshot of "Up Next" queue
  2. Tap a snapshot entry from Profile -> Settings -> Restore from local history -> Up Next History
  3. ✅ Notice that episodes are shown for that snapshot
  4. Tap "Restore" in the toolbar and confirm
  5. ✅ Notice that episodes are added to the end of "Up Next" queue

Test.2 Delete entries older than 14 days

  1. Change below line in UpNextHistoryManagerImpl
    private val periodOfSnapshot: Duration = Duration.ofDays(14)
    to
    private val periodOfSnapshot: Duration = Duration.ofMinutes(1)
  2. Fresh install the app
  3. Add episodes to queue
  4. Clear queue
  5. Notice that snapshot entry is present in Profile -> Settings -> Restore from local history -> Up Next History
  6. Wait for a minute
  7. Repeat steps 4-5
  8. ✅ Notice that a new snapshot is created and previous snapshot entry is deleted in Profile -> Settings -> Restore from local history -> Up Next History

Screenshots or Screencast

up_next_history_restore.mp4

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

@ashiagr ashiagr added [Type] Feature Adding a new feature. HACK week Developed as a part of HACK week [Area] Up Next [Area] Settings labels Mar 20, 2025
@ashiagr ashiagr added this to the 7.86 milestone Mar 20, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 20, 2025

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Mar 20, 2025

📲 You can test the changes from this Pull Request in 📱 Mobile by scanning the QR code below to install the corresponding build.
App Name 📱 Mobile
Build TypedebugProd
Commit8e4121a
Direct Downloadpocketcasts-app-prototype-build-pr3797-8e4121a.apk
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
App Name 🚗 Automotive
Build TypedebugProd
Commit8e4121a
Direct Downloadpocketcasts-automotive-prototype-build-pr3797-8e4121a.apk
📲 You can test the changes from this Pull Request in ⌚ Wear by scanning the QR code below to install the corresponding build.
App Name ⌚ Wear
Build TypedebugProd
Commit8e4121a
Direct Downloadpocketcasts-wear-prototype-build-pr3797-8e4121a.apk

ashiagr added 6 commits March 20, 2025 12:18
(cherry picked from commit ca9c952)
(cherry picked from commit ce27a0e)
(cherry picked from commit 8573a53)
(cherry picked from commit 24b9235)
(cherry picked from commit 75fd3fe)
(cherry picked from commit bcc1155)
(cherry picked from commit e8b6090)
(cherry picked from commit 447a5c3)
@ashiagr ashiagr force-pushed the task/up_next_history_page_ branch from 447a5c3 to 65defa0 Compare March 20, 2025 06:51
@ashiagr ashiagr force-pushed the task/up_next_history_details_and_restore branch from f372f67 to 46a1c71 Compare March 20, 2025 07:23
@ashiagr ashiagr marked this pull request as ready for review March 20, 2025 07:36
@ashiagr ashiagr requested a review from a team as a code owner March 20, 2025 07:36
@ashiagr ashiagr requested review from geekygecko and removed request for a team March 20, 2025 07:36
}
UpNextHistoryDetailsPage(
date = date,
onRestoreClick = ::showUpNextRestoreConfirmationDialog,
Copy link
Member

Choose a reason for hiding this comment

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

This isn't a big deal, so feel free to ignore it, but if I don't have anything currently playing or in my Up Next, the explanation text doesn't really make sense. Maybe it can just be restored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Why add an extra step? Flow updated in fb33c2e

Column {
ThemedTopAppBar(
title = formatDate(date),
bottomShadow = true,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bottomShadow = true,

I think it looks more modern to not have the drop shadow. Feel free to ignore if you disagree.

text = formattedDuration,
maxLines = 1,
modifier = Modifier.padding(top = 4.dp),
)
Copy link
Member

Choose a reason for hiding this comment

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

Can we make these look more like the episode row from filters?

Screenshot 2025-03-21 at 11 04 59 am Screenshot 2025-03-21 at 11 03 51 am

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 3980833

useEpisodeArtwork = state.useEpisodeArtwork,
)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

I can't see the bottom episode and the top episode is being cut off early.

Screenshot_20250321_111102

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't see the bottom episode

I see that bottom insets are added to the view. I can't reproduce it. Maybe padding updates for the top row fixed it.

Screen_recording_20250321_104825.mp4

Base automatically changed from task/up_next_history_page_ to main March 24, 2025 03:42
ashiagr added 2 commits March 24, 2025 09:14
# Conflicts:
#	modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/history/HistoryFragment.kt
#	modules/features/settings/src/main/java/au/com/shiftyjelly/pocketcasts/settings/history/upnext/UpNextHistoryPage.kt
#	modules/services/localization/src/main/res/values/strings.xml
@ashiagr ashiagr merged commit 4a442f2 into main Mar 24, 2025
19 checks passed
@ashiagr ashiagr deleted the task/up_next_history_details_and_restore branch March 24, 2025 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Area] Settings [Area] Up Next HACK week Developed as a part of HACK week [Type] Feature Adding a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants