Issue Summary
We are observing a focus cropping issue on the Home page while navigating through content carousels.
When scrolling vertically, certain cards—particularly those of type roller_poster—are not fully visible on screen when they gain focus.
This behavior does not occur for other card types like height below 300px, which render correctly within the visible viewport.
File: HomeScreen.tsx
<TVFocusGuideView trapFocusLeft style={styles.movieGridContainer}>
{contentdata && contentdata.length > 0 ? (
<ScrollView ref={scrollRef} style={{ flex: 1 }}>
<MovieGrid
ref={firstTileRef}
data={contentdata}
initialColumnsToRender={13}
onTileFocus={onTileFocus}
onTilePress={onTilePress}
componentStyle={styles.movieGridComponent}
destinations={destinations}
triggerFetch={handleFetch}
isFetching={isFetching}
hasTVPreferredFocus={false}
/>
</ScrollView>
) : (
<View style={styles.RotatorItem}>
<Animated.Image
source={require('../assets/progress_loader.png')}
style={[styles.imageStyle, { transform: [{ rotate: rotation }] }]}
/>
</View>
)}
</TVFocusGuideView>
File: MovieGrid.tsx
const calculateEstimatedItemSize = (item: any) => {
const cardType = item?.data?.[0]?.cardType;
switch (cardType) {
case 'roller_poster':
return 450;
case 'sheet_poster':
case 'sheet_poster_package':
return 400;
case 'network_poster':
case 'network_poster_package':
return 350;
default:
return 450;
}
};
<View style={styles.scrollView}>
<FlashList
data={data}
renderItem={({ item, index }) => renderCarousel(item, index)}
keyExtractor={(item, index) => `${item.heading}-${index}`}
estimatedItemSize={data.length > 0 ? calculateEstimatedItemSize(data[0]) : 400}
estimatedListSize={{
height: Dimensions.get('screen').height,
width: Dimensions.get('screen').width,
}}
/>
</View>
Observed Behavior
-
When navigating vertically, the focused card gets partially cropped (focus outline is not fully visible).
-
The issue occurs only for
roller_postercards, which have greater height (≈450px). -
Other poster types render and focus correctly within the visible area.
Expected Behavior
The focused card should remain fully visible and centered within the scrollable view when navigating up or down, regardless of the card type or height.
Possible Causes (Initial Analysis)
-
The issue might be related to
ScrollViewconfiguration withinHomeScreen.tsx, which may not be auto-adjusting for larger item heights. -
Alternatively, incorrect
estimatedItemSizeorestimatedListSizevalues inFlashListcould be causing layout miscalculations and improper scroll offset handling.
Request for Guidance
Could you please review the implementation and suggest:
-
Whether any configuration or prop should be added to ensure the focused card remains fully visible during scroll operations?
-
If adjustments are needed in
FlashList’sestimatedItemSizeorScrollViewbehavior to accommodate taller poster types (likeroller_poster)? -
Any best practices for handling focus visibility and scroll offset correction in
TVFocusGuideView+ScrollView+FlashListintegrations?Thank you .
Vittal maradi .