fredrikburmester / streamyfin

A Jellyfin client build with Expo
Mozilla Public License 2.0
1.12k stars 31 forks source link

Draft for Episode Lsit #194

Closed sldless closed 1 month ago

sldless commented 1 month ago

Summary by Sourcery

Add an EpisodeList component to display and interact with episodes within the video player, allowing users to toggle the episode list view and select episodes to play.

New Features:

sourcery-ai[bot] commented 1 month ago

Reviewer's Guide by Sourcery

This pull request implements a new feature for displaying an episode list in a video player control interface. It adds functionality to show and hide an episode list for TV series, and includes a new EpisodeList component with a modal for displaying episode details.

User journey diagram for episode list feature

journey
    title User journey for displaying episode list in video player
    section Video Player Controls
      User clicks on episode list button: 5: User
      Episode list is displayed: 5: System
      User selects an episode: 5: User
      Episode details are shown in modal: 5: System
      User clicks play episode: 5: User
      Episode starts playing: 5: System

Class diagram for EpisodeList component

classDiagram
    class EpisodeList {
        +string showId
        +BaseItemDto selectedEpisode
        +BottomSheetModal bottomSheetModalRef
        +void handlePresentModalPress(BaseItemDto episode)
        +void closeModal()
        +void renderEpisode(BaseItemDto item)
    }
    class BaseItemDto {
        <<interface>>
    }
    EpisodeList --> BaseItemDto
    EpisodeList --> BottomSheetModal
    EpisodeList --> BottomSheetBackdrop
    EpisodeList --> BottomSheetView
    EpisodeList --> Text
    EpisodeList --> Button
    EpisodeList --> EpisodeCard
    EpisodeList --> toast

File-Level Changes

Change Details Files
Add episode list toggle functionality to video player controls
  • Import EpisodeCard component
  • Add state for managing episode view visibility
  • Implement toggleEpisodeView function
  • Add conditional rendering for episode list button
  • Render EpisodeList component when EpisodeView is true
components/video-player/Controls.tsx
Create new EpisodeList component
  • Implement EpisodeList component with props for showId
  • Add state management for selected episode
  • Create bottom sheet modal for displaying episode details
  • Implement episode selection and modal presentation logic
  • Style the episode list container and separator
components/EpisodeList.tsx

Tips and commands #### Interacting with Sourcery - **Trigger a new review:** Comment `@sourcery-ai review` on the pull request. - **Continue discussions:** Reply directly to Sourcery's review comments. - **Generate a GitHub issue from a review comment:** Ask Sourcery to create an issue from a review comment by replying to it. - **Generate a pull request title:** Write `@sourcery-ai` anywhere in the pull request title to generate a title at any time. - **Generate a pull request summary:** Write `@sourcery-ai summary` anywhere in the pull request body to generate a PR summary at any time. You can also use this command to specify where the summary should be inserted. #### Customizing Your Experience Access your [dashboard](https://app.sourcery.ai) to: - Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others. - Change the review language. - Add, remove or edit custom review instructions. - Adjust other review settings. #### Getting Help - [Contact our support team](mailto:support@sourcery.ai) for questions or feedback. - Visit our [documentation](https://docs.sourcery.ai) for detailed guides and information. - Keep in touch with the Sourcery team by following us on [X/Twitter](https://x.com/SourceryAI), [LinkedIn](https://www.linkedin.com/company/sourcery-ai/) or [GitHub](https://github.com/sourcery-ai).