Skip to content

Improve poster display and keyboard handling across screens#186

Merged
Kallb123 merged 3 commits into
mainfrom
claude/thumbnail-audiobook-aspect-ratio-jcuiaz
Jul 18, 2026
Merged

Improve poster display and keyboard handling across screens#186
Kallb123 merged 3 commits into
mainfrom
claude/thumbnail-audiobook-aspect-ratio-jcuiaz

Conversation

@Kallb123

@Kallb123 Kallb123 commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

This PR makes two main improvements to the app:

  1. Enhanced poster display: Refactors the PosterBox component to use a blurred backdrop for non-portrait images, eliminating letterboxing and providing a more polished visual experience. Fix Thumbnails and audiobook covers should be slightly wider to make up for the lack of height #175
  2. Better keyboard handling: Adds KeyboardAvoidingView to multiple screens to ensure modals and forms don't get obscured by the on-screen keyboard. Fix Typing into boxes near the bottom of the screen covers the screen with the on screen keyboard #185

Key Changes

PosterBox Component Refactoring

  • Removed posterIsLandscape property from PosterBoxItem type—the component now automatically handles all image aspect ratios
  • Removed viewOrientation prop dependency, simplifying the component interface
  • Implemented a dual-image rendering approach:
    • A blurred, cover-scaled backdrop image fills the entire poster box
    • A contain-scaled foreground image displays the actual art without cropping
    • Portrait posters cover the box exactly, hiding the backdrop; non-portrait images (landscape stills, square covers) sit centered with the blurred backdrop visible around them
  • Added BACKDROP_BLUR_RADIUS constant (24) for consistent visual styling
  • Removed dynamic height calculation logic—now uses fixed thumbnailHeight for all items

MediaBrowserScreen Updates

  • Removed posterIsLandscape field from DisplayItem type definitions
  • Removed getEpisodePosterIsLandscape() helper function
  • Removed viewOrientation prop when rendering PosterBox components
  • Cleaned up four episode display item creation sites

Keyboard Handling Improvements

  • _layout.tsx (drawer): Wrapped password modal content in KeyboardAvoidingView with platform-specific behavior
  • settings.tsx: Added KeyboardAvoidingView wrapper around ScrollView with iOS padding behavior
  • edititem.tsx: Added KeyboardAvoidingView wrapper around ScrollView with iOS padding behavior
  • firsttime.tsx: Added KeyboardAvoidingView wrapper around ScrollView with iOS padding behavior

All keyboard-avoiding views use behavior={Platform.OS === 'ios' ? 'padding' : undefined} to provide appropriate spacing on iOS while avoiding layout issues on Android.

Implementation Details

  • The backdrop blur effect uses React Native's Image blurRadius prop for native performance
  • The dual-image approach maintains backward compatibility while improving visual presentation for all image types
  • KeyboardAvoidingView additions are minimal and non-breaking, only affecting keyboard interaction behavior

https://claude.ai/code/session_017gfyJkR4WmDdEjpXhk1pFC

claude and others added 3 commits July 17, 2026 23:50
Grid cells were sized to each item's native aspect ratio (16:9 for
landscape stills and video thumbnails, 2:3 for posters), and audiobook
covers had no handling so their square art was cropped into the 2:3 box.

Every cell now uses the uniform 2:3 poster box. The art is drawn with
contentFit "contain" so it is never cropped, and a blurred, cover-scaled
copy of the same image fills the surrounding letterbox area instead of
flat empty bars. This applies to landscape thumbnails and square
audiobook covers alike; portrait posters cover the box exactly and hide
the backdrop.

Removes the now-unused posterIsLandscape plumbing and the
getEpisodePosterIsLandscape helper.

Fixes #175

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017gfyJkR4WmDdEjpXhk1pFC
None of the screens with TextInputs (Settings, Edit Item, First Time
Setup, and the drawer's password modal) had any keyboard-avoidance
handling, so focusing a field near the bottom of a ScrollView — or the
password modal, which renders in its own native layer outside any
screen-level handling — could leave it hidden behind the on-screen
keyboard.

Wrap each of these in a KeyboardAvoidingView (padding on iOS; Android
already resizes the window via Expo's default adjustResize
windowSoftInputMode, so no behavior is needed there — except inside the
Modal, which doesn't reliably inherit that resize and needs an explicit
"height" behavior).

Fixes #185

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017gfyJkR4WmDdEjpXhk1pFC
@Kallb123
Kallb123 merged commit 1056e79 into main Jul 18, 2026
1 check passed
@Kallb123
Kallb123 deleted the claude/thumbnail-audiobook-aspect-ratio-jcuiaz branch July 18, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants