-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Adding Jetcaster updates #1561
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
Adding Jetcaster updates #1561
Conversation
…ns and removal of episode from queue
Change-Id: I00ee8f7dca86aa381c33e160eb451a7d6647bebd
Change-Id: I7bc3ddf1225154a4ff4f23ed47861be3f18ddf7e
Change-Id: I09331ecf38aa02d04ef24656ce597bce963b2fbd
Change-Id: I6d3518d8190a859ebb8b9d2c1d3bbd21d4f819f5
Change-Id: I82530fb841b93a1c6b9fdbd865b9576cb502dcda
Change-Id: I1faa1772f88f3f3903aa8d5f6736dc313d3a85cb
Change-Id: Ice09cba04437882c94632c3161a38e1b4f75cbb1
Change-Id: Id839934e6471b6e7abbc652ceecbdd00b3319c01
Change-Id: Id81a3b727e44caea76b266e8d5cf5ad6fc65d5cb
Change-Id: Id0fd4d05efa02acf7e3037071abc2397dca06135
Change-Id: I844490d2d96a7351f652d7a3dee00d247ec72161
Change-Id: Ied425db3bad0c4fbb48e9730ac9740c9a31f2c77
Change-Id: I737451dad6a4be3154406e8603f4e7acf1829f7a
Change-Id: I2da7dcb902c0e09bae000a73373096b3e55d4020
Change-Id: I3c65b2f5c0feca806f9df6a6b8487f212bcab72c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @MagicalMeghan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello team, gemini-code-assist here with a summary of this pull request. This PR focuses on updating the Jetcaster application, primarily by integrating Material You Expressive design elements and preparing for shared element transitions. It also includes some data layer enhancements, such as supporting multiple media URLs for episodes and adding episode deletion functionality. Finally, the TV module's player is updated to use the Media3 library.
Highlights
- Shared Element Transitions: Preparation and initial implementation for shared element transitions, particularly for the podcast image when navigating between the home/category screens and the player screen. This involves adding
SharedTransitionLayout
and passing modifiers via Composition Locals. - Episode Data Model Enhancements: The
Episode
data model and related domain/network models have been updated to include a list ofmediaUrls
, allowing for multiple audio sources per episode. A Room TypeConverter was added to handle the persistence of this list. - Episode Deletion Functionality: Added the ability to delete episodes from the data store and integrated this into the UI, notably via swipe-to-dismiss in the episode list items.
- Media3 Integration (TV): The TV module's player screen has been refactored to use the Media3 library for audio playback, including setting up ExoPlayer and a MediaSession.
Changelog
Click here to see the changelog
- Jetcaster/core/data-testing/src/main/java/com/example/jetcaster/core/data/testing/repository/TestEpisodeStore.kt
- Added
deleteEpisode
function for testing purposes.
- Added
- Jetcaster/core/data/src/main/java/com/example/jetcaster/core/data/database/model/Episode.kt
- Added
mediaUrls
field to theEpisode
Room entity. - Added
ListOfStringConverter
for Room to handleList<String>
.
- Added
- Jetcaster/core/data/src/main/java/com/example/jetcaster/core/data/network/PodcastFetcher.kt
- Updated
toEpisode
mapping to extractmediaUrls
from RSS feed enclosures.
- Updated
- Jetcaster/core/data/src/main/java/com/example/jetcaster/core/data/repository/EpisodeStore.kt
- Added
deleteEpisode
function to theEpisodeStore
interface and itsLocalEpisodeStore
implementation.
- Added
- Jetcaster/core/designsystem/src/main/java/com/example/jetcaster/designsystem/component/PodcastImage.kt
- Added
imageModifier
parameter to allow applying modifiers specifically to the internal image component, useful for shared element transitions.
- Added
- Jetcaster/core/designsystem/src/main/java/com/example/jetcaster/designsystem/theme/Color.kt
- Replaced the entire color scheme definition with new Material You Expressive colors.
- Jetcaster/core/designsystem/src/main/java/com/example/jetcaster/designsystem/theme/Type.kt
- Modified
displayLarge
anddisplayMedium
typography styles, changing font family toRobotoFlex
and adjusting parameters fordisplayLarge
.
- Modified
- Jetcaster/core/designsystem/src/main/java/com/example/jetcaster/designsystem/theme/Typography.kt
- Added
RobotoFlex
font family definition.
- Added
- Jetcaster/core/domain/src/main/java/com/example/jetcaster/core/model/EpisodeInfo.kt
- Added
podcastUri
andmediaUrls
fields to theEpisodeInfo
domain model. - Updated
asExternalModel
and addedasDaoModel
mapping functions.
- Added
- Jetcaster/core/domain/src/main/java/com/example/jetcaster/core/player/model/PlayerEpisode.kt
- Added
mediaUrls
field to thePlayerEpisode
model and updated mapping.
- Added
- Jetcaster/gradle/libs.versions.toml
- Updated Compose BOM to an alpha version.
- Added Media3 dependencies (
media3-ui-compose
,media3-session
,media3-exoplayer
).
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/JetcasterApp.kt
- Introduced
SharedTransitionLayout
and Composition Locals (LocalSharedTransitionScope
,LocalAnimatedVisibilityScope
) for shared element transitions. - Removed
ExperimentalMaterial3AdaptiveApi
opt-in.
- Introduced
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/Home.kt
- Removed
ExperimentalFoundationApi
opt-in. - Replaced
TabRow
withHorizontalFloatingToolbar
(PillToolbar
) for category selection. - Replaced
HorizontalPager
withHorizontalMultiBrowseCarousel
for featured podcasts. - Updated styling and layout for carousel items.
- Added
removeFromQueue
parameter to relevant composables.
- Removed
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/category/PodcastCategory.kt
- Added
ExperimentalSharedTransitionApi
opt-in. - Replaced
LazyRow
withHorizontalUncontainedCarousel
for category podcasts. - Updated styling and layout for category podcast items.
- Added
removeFromQueue
parameter topodcastCategory
. - Integrated shared element transition modifiers for
EpisodeListItem
.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/discover/Discover.kt
- Added
removeFromQueue
parameter todiscoverItems
. - Changed filter chip shape to
large
.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/library/Library.kt
- Added
removeFromQueue
parameter tolibraryItems
. - Changed library headline style to
headlineMedium
. - Added
animateItem
modifier toEpisodeListItem
.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/player/PlayerScreen.kt
- Added
ExperimentalSharedTransitionApi
andExperimentalMaterial3ExpressiveApi
opt-ins. - Integrated shared element transition modifiers for the podcast image.
- Updated
PodcastDescription
styles. - Replaced player control buttons with Material3 Expressive
ToggleButton
andIconButton
within aButtonGroup
.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/podcast/PodcastDetailsScreen.kt
- Added
ExperimentalMaterial3ExpressiveApi
opt-in. - Added
removeFromQueue
parameter. - Integrated
animateItem
modifier forEpisodeListItem
. - Updated header layout, image size, and title style.
- Replaced subscribe/more buttons with Material3 Expressive
ButtonGroup
andToggleButton
(including a new notification toggle).
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/shared/EpisodeListItem.kt
- Added
SwipeToDismissBox
to enable swipe-to-delete functionality. - Added
removeFromQueue
parameter. - Added
imageModifier
parameter to pass shared element modifiers.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/theme/Theme.kt
- Added
ExperimentalMaterial3ExpressiveApi
opt-in. - Changed
MaterialTheme
toMaterialExpressiveTheme
and applied an expressive motion scheme.
- Added
- Jetcaster/mobile/src/main/java/com/example/jetcaster/util/Buttons.kt
- Added
ExperimentalMaterial3ExpressiveApi
opt-in. - Replaced
IconButton
with Material3 ExpressiveIconToggleButton
for the follow button, applying new styling and shapes.
- Added
- Jetcaster/mobile/src/main/res/drawable/genres.xml
- Added a new drawable resource for a 'genres' icon.
- Jetcaster/mobile/src/main/res/values/strings.xml
- Added new string resources for the Discover and Library toolbar buttons.
- Jetcaster/tv/build.gradle.kts
- Added Media3 dependencies.
- Jetcaster/tv/src/main/java/com/example/jetcaster/tv/ui/player/PlayerScreen.kt
- Integrated Media3 ExoPlayer and MediaSession for audio playback.
- Linked player controls to ExoPlayer actions.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Material, expressive,
New colors, quite impressive.
Swipe left to delete,
Animations sweet,
Compose updates progressive.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces substantial updates to Jetcaster, focusing on migrating to Material Expressive components, enhancing data models to include multiple media URLs, adding episode deletion capabilities, and integrating Media3 for the TV player. The introduction of shared element transitions and swipe-to-delete functionality on mobile are also great improvements.
The code is generally well-structured, and the changes are comprehensive. I've identified a couple of areas where clarification or minor adjustments might be beneficial.
Summary of Findings
- Local State for Notification Toggle: In
PodcastDetailsScreen.kt
, the notification toggle state (isNotificationOn
) is managed locally. If this is meant to be a persistent setting, it should be handled by the ViewModel. - ExoPlayer Repeat Mode on TV: In the TV
PlayerScreen.kt
,ExoPlayer
is set toREPEAT_MODE_ALL
. This behavior should be confirmed if it aligns with the desired user experience for podcast playback. - Data Model Enhancements: The addition of
mediaUrls
to episode-related data classes and the introduction ofdeleteEpisode
functionality are well-implemented across the data layer and ViewModels. - Material Expressive Update: The UI updates to Material Expressive components, new color schemes, typography, and motion are significant and appear to be consistently applied.
- Shared Element Transitions: The setup for shared element transitions in the mobile UI is a good enhancement for visual continuity.
- Room TypeConverter for List: In
Episode.kt
,ListOfStringConverter
uses comma-separated values. While generally fine for URLs, this approach could fail if a URL contained a comma. JSON serialization would be more robust but adds complexity. (Severity: low, not commented due to settings)
Merge Readiness
The pull request introduces many valuable updates and is largely in good shape. There are a couple of medium-severity points regarding state management for the notification toggle and the default repeat mode for the TV player that would be good to clarify or address. Once these are considered, the PR should be in a strong position for merging. As an AI, I am not authorized to approve pull requests; please ensure further review and approval from team members before merging.
MaterialTheme.colorScheme.tertiary | ||
else | ||
MaterialTheme.colorScheme.secondary | ||
var isNotificationOn by remember { mutableStateOf(false) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isNotificationOn
state for the notification toggle button is currently managed as a local remember
state. If this button is intended to control persistent notification settings for the podcast, this state would need to be hoisted to the ViewModel and likely persisted. Could you clarify if this is the intended behavior or if a more persistent state management is planned for this feature?
repeatMode = REPEAT_MODE_ALL | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ExoPlayer is configured with repeatMode = REPEAT_MODE_ALL
. For a podcast player, this might mean the current episode or the entire queue repeats indefinitely. Is this the intended default behavior? Often, users might expect an episode or queue to play through once and then stop, or proceed to the next unplayed item without repeating.
Change-Id: I6ad4d0ad97796205192e851d9c633793bacf0b98
Change-Id: I6aad30ec69137b902465b8d409fb77782bbdc7df
Merging internal git code and updating Jetcaster to material expressive