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

Item View - Refactor #165

Merged
merged 10 commits into from
Sep 5, 2021
Merged

Conversation

LePips
Copy link
Member

@LePips LePips commented Sep 1, 2021

I took some time to refactor how items are presented.

Why?

The views for all the items are the same, except for Season. The original files for the views were large and ugly and would sometimes crash the type checker on my machine so I couldn't build for a little bit.

A lot of refactoring and consolidating code occurred and this just works nicely overall.

Enforced better MVVM.

Design/UX Changes

  • Play button is shown when looking at a Series. Currently, this is enabled only when the specific series has a valid "Next Up" episode. I need to add implementation to check if an episode is currently being watched in the series and go to that, but that logic will come with some other work I will get to. The button will be visibly disabled in the state where there is not a valid "Next Up" episode
  • Play button is shown when looking at a Season. This will play the next unwatched episode. If all episodes have been watched in the season, it will play the first episode of the season.
  • Added Cast & Crew. This was previously just Cast but I added some valid crew as well and made them portraits. I also added logic to only grab the "first role" for a cast member because sometimes a cast member will have a super long role list. Also made the cards for the cast portrait because the small squares would awkwardly cut off faces. Overall, attempts were made to make text not truncate as much. Also, if a picture cannot be grabbed for the crew or cast member, it will display their initials instead of a blank card.
  • Added pills. Recommended from the chat. Genre and other items we want will be rendered as little pills. This shows the user that these are selectable.
  • Redid list design when looking at a Season. I think it looks better because episode titles aren't truncated as much which are often longer. Also looks a lot better on iPad.
  • Made item title a little bigger, bringing more focus to the media.
  • Moved item runtime to its own line (except for episode card), I think it's a very important metric when looking at media and needed to be more explicit.
  • Customized the back button for the navigation bar. This was part of some work I attempted by making the navigation bar clear until you have scrolled down a certain offset and then appear blurred. Nothing currently works in SwiftUI for that to work.
  • Removed item titles from navigation bar. Was redundant but if I get the offset blur working as just previously described, I will also animate in/out the item title with the blur.

Bug

This introduced a bug I haven't taken the time to look at but want this work in and will file the bug to fix.

After playing media and exiting, when in portrait on an iPhone there will be a larger empty space at the top of the scroll view.

Thoughts for Future Features

  • Make the item view customizable. To me, I don't care about the cast or genres when looking at my media all of the time. I want the ability to just focus on my movie/show and just that. Would be customized through Settings and I have thoughts about how that would happen but this would low priority to me.

@LePips LePips requested a review from acvigue as a code owner September 1, 2021 05:37
@sonarcloud
Copy link

sonarcloud bot commented Sep 1, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 32 Code Smells

No Coverage information No Coverage information
2.3% 2.3% Duplication

@PangMo5
Copy link
Member

PangMo5 commented Sep 1, 2021

That's really awesome! 😎

@acvigue
Copy link
Member

acvigue commented Sep 2, 2021

will look at later today - at a volleyball game.

@acvigue
Copy link
Member

acvigue commented Sep 4, 2021

looking at this now.

@LePips
Copy link
Member Author

LePips commented Sep 5, 2021

@acvigue
Hey, sorry, I know that you're very busy with school and don't mean to be pressing. Could this be approved and merged?

@acvigue
Copy link
Member

acvigue commented Sep 5, 2021 via email

@acvigue acvigue merged commit b1322f5 into jellyfin:main Sep 5, 2021
@LePips LePips deleted the item-view-simplification branch October 19, 2021 23:39
@G10vanni74
Copy link

Will the addition of Cast & Crew in the application be available in the betas of the application or after the release

Do you have screenshots of what it could look like on apple TV or is it the same on iPad ?

@LePips
Copy link
Member Author

LePips commented Aug 5, 2022

Cast & Crew will be implemented before release.

@G10vanni74
Copy link

Great. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants