Skip to content

feature: Add guest actors to episode view#299

Merged
PartyDonut merged 1 commit intodevelopfrom
feature/add-guest-actors-to-episode-details
Apr 5, 2025
Merged

feature: Add guest actors to episode view#299
PartyDonut merged 1 commit intodevelopfrom
feature/add-guest-actors-to-episode-details

Conversation

@PartyDonut
Copy link
Copy Markdown
Collaborator

Pull Request Description

Adds guest actors to episode view.

@PartyDonut PartyDonut added the feature New feature or request label Apr 5, 2025
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Apr 5, 2025

Reviewer's Guide by Sourcery

This pull request adds the ability to display guest actors on the episode detail screen. It introduces a new PeopleRow widget for displaying lists of people horizontally, and it also adds extension methods to filter lists of Person objects into main cast and guest actors. The EpisodeDetailModel is updated to include a list of guest actors.

Updated class diagram for EpisodeDetailModel

classDiagram
  class EpisodeDetailModel {
    SeriesModel? series
    List~EpisodeModel~ episodes
    EpisodeModel? episode
    List~Person~ guestActors
    +EpisodeDetailModel()
    +copyWith()
  }
Loading

File-Level Changes

Change Details Files
Added a PeopleRow widget to display guest actors in the episode detail screen.
  • Added PeopleRow widget to display guest actors.
  • Added a condition to check if there are any guest actors to display.
  • Added contentPadding to the PeopleRow widget.
lib/screens/details_screens/episode_detail_screen.dart
Created a new PeopleRow widget to display a horizontal list of people.
  • Created a PeopleRow widget that takes a list of Person objects.
  • Added a label to the HorizontalList based on whether the people are cast/crew or guest actors.
  • Implemented navigation to the PersonDetailScreen when a person is tapped.
  • Added a check to see if the person has a name before displaying them.
lib/screens/shared/media/people_row.dart
Added PeopleRow widgets to display main cast and guest actors in the season detail screen.
  • Added PeopleRow widget for main cast.
  • Added PeopleRow widget for guest actors.
  • Added conditions to check if there are any main cast or guest actors to display.
  • Added contentPadding to the PeopleRow widgets.
lib/screens/details_screens/season_detail_screen.dart
Updated the EpisodeDetailModel to include a list of guest actors.
  • Added a guestActors property to the EpisodeDetailModel.
  • Updated the copyWith method to include the guestActors property.
lib/providers/items/episode_details_provider.dart
Added extension methods to filter lists of Person objects into main cast and guest actors.
  • Added a guestActors getter that filters the list to only include guest actors.
  • Added a mainCast getter that filters the list to exclude guest actors.
lib/util/people_extension.dart

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. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the 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 exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard 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

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @PartyDonut - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider extracting the logic for determining the PeopleRow label into a separate helper function for better readability.
  • It might be good to add a comment explaining why the people.any check is needed in PeopleRow.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@PartyDonut PartyDonut merged commit 7a50e0c into develop Apr 5, 2025
1 check passed
@PartyDonut PartyDonut deleted the feature/add-guest-actors-to-episode-details branch April 5, 2025 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant