Skip to content

Conversation

theo-mesnil
Copy link
Owner

No description provided.

@theo-mesnil theo-mesnil requested a review from Copilot August 7, 2025 21:14
Copy link

@Copilot Copilot AI left a 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 upgrades the @shopify/flash-list library from version 1.7.6 to version 2.0.0, which requires removing deprecated properties and updating type definitions to maintain compatibility.

  • Removes estimatedItemSize prop from FlashList components (deprecated in v2)
  • Updates ViewToken type definition to include generic type parameter
  • Improves null safety handling for contentContainerStyle prop

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
package.json Updates flash-list dependency to v2.0.0
src/components/app/index/Overview/index.tsx Removes estimatedItemSize, updates ViewToken types, and inlines width calculation
src/components/VerticalList/index.tsx Removes estimatedItemSize and adds null safety for contentContainerStyle
src/components/List/index.tsx Removes estimatedItemSize prop

Comment on lines +83 to +85
...(typeof contentContainerStyle === 'object' && contentContainerStyle
? contentContainerStyle
: {}),
Copy link
Preview

Copilot AI Aug 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The null safety check is overly complex. Since contentContainerStyle is likely typed as an optional object, a simpler check like ...(contentContainerStyle || {}) would be more readable and achieve the same result.

Suggested change
...(typeof contentContainerStyle === 'object' && contentContainerStyle
? contentContainerStyle
: {}),
...(contentContainerStyle || {}),

Copilot uses AI. Check for mistakes.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not working

@theo-mesnil theo-mesnil merged commit 3f58e64 into main Aug 7, 2025
1 check passed
@theo-mesnil theo-mesnil deleted the chore-upgrade-flash-list branch August 7, 2025 21:19
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.

1 participant