-
-
Notifications
You must be signed in to change notification settings - Fork 243
fix(home): fixed title vertical dimension #1100
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
base: main
Are you sure you want to change the base?
Conversation
This change adjusts the `ItemCard` component to enforce a single-line title for episodes, even in a vertical layout, to prevent the series name from wrapping and pushing other elements down. It also introduces a new `@Preview` for the vertical episode card to facilitate easier visualization of this layout.
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.
Pull request overview
This PR fixes a layout issue in the ItemCard component where episode series names would wrap to multiple lines in vertical layouts, causing unwanted layout shifts. The fix ensures that episode titles are always displayed on a single line regardless of the layout direction.
Key Changes:
- Modified the Text component logic to enforce single-line titles for episodes in both horizontal and vertical layouts
- Added a new preview function for vertical episode cards to improve development workflow
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/phone/src/main/java/dev/jdtech/jellyfin/presentation/film/components/ItemCard.kt
Outdated
Show resolved
Hide resolved
app/phone/src/main/java/dev/jdtech/jellyfin/presentation/film/components/ItemCard.kt
Outdated
Show resolved
Hide resolved
…components/ItemCard.kt Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I actually don't mind the resizing. |
This change wraps the text elements within a `Column` with a fixed height. This ensures that cards in the same row have their titles and subtitles aligned, regardless of whether a card is a movie (2 lines of text) or an episode (1 line of text).
NewScreen_Recording_20251226_225645_Findroid.Debug.mp4OldScreen_Recording_20251226_225756_Findroid.Debug.mp4I think having the space always there is better than it appearing and disappearing while side scrolling. |
|
I have changed my mind, I do agree that the layout should not shift. But setting a fixed height with a column does not work for two reasons:
Once those are resolved we can move forward to merging this. However I did just commit some of your changes in 34f7e95 |
|
Possible solution: the secondary text (e.g., episode name, year) now occupies a second line, preventing the card from resizing.
VideoScreen_Recording_20260106_153800_Findroid.Debug.mp4 |
This change adjusts the
ItemCardcomponent to enforce a single-line title for episodes, even in a vertical layout, to prevent the series name from wrapping and pushing other elements down.It also introduces a new
@Previewfor the vertical episode card to facilitate easier visualization of this layout.