Conversation
Summary of ChangesHello @McBaumwolle, 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! This pull request enhances the user experience on media detail pages by revamping the cast display. It transitions the cast section to a more dynamic, horizontally scrollable layout, allowing users to easily browse a larger number of cast members. Additionally, it provides a convenient way to access the complete cast list on TMDB when many cast members are present, streamlining the discovery of related information. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the cast view to be a horizontally scrollable list, which is a nice UI improvement. I've left a few comments to address a bug you mentioned in the description regarding the 'View All' button, and some suggestions to improve maintainability by replacing inline CSS styles with Tailwind utility classes. Overall, good work on this feature!
| <div class="shrink-0 bg-[#2a2f35] rounded-lg overflow-hidden shadow-lg group flex flex-col" | ||
| style="width: 176px; | ||
| min-width: 176px; | ||
| height: 264px" | ||
| role="listitem"> |
There was a problem hiding this comment.
Using inline styles for width and height can make maintenance harder. It's better to use Tailwind CSS utility classes for consistency. You can replace these inline styles with w-44 min-w-44 h-[264px].
<div class="shrink-0 bg-[#2a2f35] rounded-lg overflow-hidden shadow-lg group flex flex-col w-44 min-w-44 h-[264px]"
role="listitem">
| <a href="https://www.themoviedb.org/person/{{ cast.id }}" | ||
| target="_blank" | ||
| class="relative block w-full" | ||
| style="height: 78%"> |
There was a problem hiding this comment.
Using a percentage-based height can be fragile and lead to unexpected layout issues if the parent's height changes. A more robust approach would be to give the text container below a fixed height and let this image container take the remaining space using flex-1.
For example, you could give the div on line 25 a class like h-16 and change this a tag to have flex-1 and remove the inline style.
| class="shrink-0 bg-[#2a2f35] rounded-lg shadow-lg flex flex-col items-center justify-center hover:bg-[#343a40] transition-colors duration-200" | ||
| style="width: 176px; | ||
| min-width: 176px; | ||
| height: 264px"> |
There was a problem hiding this comment.
Similar to the cast_card.html component, it's better to use Tailwind CSS utility classes instead of inline styles for consistency and maintainability.
class="shrink-0 bg-[#2a2f35] rounded-lg shadow-lg flex flex-col items-center justify-center hover:bg-[#343a40] transition-colors duration-200 w-44 min-w-44 h-[264px]">
…ed some of my comments)
|
I tried all the suggestions from the bot about Tailwind instead of inline styles, but the layout kept collapsing (the cast cards then only had the width of the person's name). I'd suggest keeping the inline styles, but @FuzzyGrim has to decide on this as it's not a perfect solution. As far as I see it, it does not break parent columns (right now!?) and the rest of the PR works as expected on my end. Juts let me know if that works for you, otherwise I just have to learn some Tailwind haha. |
|
Thanks! It looks great! I can try fixing the inline styling as a follow up. |
This PR (draft as it is still buggy but wanted to put it there anyway for review, etc.) changes the handy new cast view (from @connorjburton) to be horizontally scrollable, similar to what trakt does at the moment.
Details
I tried a separate button (like discussed here) which did not work (for me) and was kinda inconvenient when there was a giant cast list. I increased the cast fetch number from 10 to 30, and if there are more it adds a button/card in the end linking to TMDB. This is a bit buggy right now, hence the draft.
Issues