fix: resolve type errors from NativeWindUI 2.0.0 upgrade#1984
Open
andrew-bierman wants to merge 1 commit intodevelopmentfrom
Open
fix: resolve type errors from NativeWindUI 2.0.0 upgrade#1984andrew-bierman wants to merge 1 commit intodevelopmentfrom
andrew-bierman wants to merge 1 commit intodevelopmentfrom
Conversation
- AlertRef -> AlertMethods (18 files) - LargeTitleSearchBarRef -> LargeTitleSearchBarMethods (4 files) - ContextMenuRef -> ContextMenuMethods (chat.tsx) - Replace colors.green/colors.yellow with hardcoded RGB values - Fix icon names to use valid SfSymbols (arrowshape.left, plus.app, clipboard, bell, trash, house.fill, square.and.pencil) - Fix person-outline -> account-outline for MaterialCommunityIcons - Fix backpack -> bag-personal for MaterialCommunityIcons - Remove deprecated namingScheme prop from dropdown items - Replace rootStyle with style on List component - Add missing Share import from react-native (TripDetailScreen) - Fix SearchInputRef type to use TextInput directly (LocationSearchScreen)
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses TypeScript breakages introduced by the @packrat-ai/nativewindui 2.0.0 upgrade across the Expo app by updating renamed ref types/method interfaces, removing deprecated props, and aligning a handful of UI usages (icons/colors/Share import) with the new library surface area.
Changes:
- Renamed NativeWindUI ref types (
AlertRef/LargeTitleSearchBarRef/ContextMenuRef→*Methods) and updateduseRefusages accordingly. - Removed/updated deprecated NativeWindUI props (
rootStyle,rootClassName,namingScheme) and adjusted several icon names. - Replaced some theme color usages (
colors.green/colors.yellow) with RGB literals and added a missingShareimport where needed.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/expo/features/weather/screens/LocationSearchScreen.tsx | Updates SearchInput ref typing to match new component/ref expectations. |
| apps/expo/features/weather/components/WeatherAlertsTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/trips/screens/TripListScreen.tsx | Renames large title search bar ref type to LargeTitleSearchBarMethods. |
| apps/expo/features/trips/screens/TripDetailScreen.tsx | Renames alert ref type and adds Share import for share action. |
| apps/expo/features/trips/components/UpcomingTripsTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/trips/components/TripCard.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/trips/components/TrailConditionsTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/packs/screens/PackListScreen.tsx | Renames large title search bar ref type to LargeTitleSearchBarMethods. |
| apps/expo/features/packs/components/WeightAnalysisTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/packs/components/PackStatsTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/packs/components/PackCategoriesTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/packs/components/HorizontalCatalogItemCard.tsx | Replaces removed theme color usage for rating star with RGB literal. |
| apps/expo/features/packs/components/GearInventoryTile.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/packs/components/GapSuggestion.tsx | Replaces removed theme color usage for priority color with RGB literal. |
| apps/expo/features/pack-templates/screens/PackTemplateListScreen.tsx | Renames large title search bar ref type to LargeTitleSearchBarMethods. |
| apps/expo/features/catalog/screens/CatalogItemDetailScreen.tsx | Replaces removed theme color usage for rating star with RGB literal. |
| apps/expo/features/catalog/components/ItemReviews.tsx | Replaces removed theme color usage for verified/star indicators with RGB literals. |
| apps/expo/features/catalog/components/CatalogItemSelectCard.tsx | Replaces removed theme color usage for rating star with RGB literal. |
| apps/expo/features/catalog/components/CatalogItemCard.tsx | Replaces removed theme color usage for rating star with RGB literal. |
| apps/expo/features/auth/components/DeleteAccountButton.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/features/ai/components/WebSearchGenerativeUI.tsx | Replaces removed theme color usage for link/source indicator with RGB literal. |
| apps/expo/features/ai-packs/screens/AIPacksScreen.tsx | Renames alert ref type and updates alert icon + color usage. |
| apps/expo/app/auth/one-time-password.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/app/auth/index.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/app/auth/(login)/reset-password.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/app/auth/(login)/forgot-password.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/app/auth/(create-account)/credentials.tsx | Renames alert ref type to AlertMethods. |
| apps/expo/app/_layout.tsx | Renames global app alert ref type to AlertMethods. |
| apps/expo/app/(app)/shopping-list.tsx | Replaces removed theme color usage for “purchased” indicator with RGB literal. |
| apps/expo/app/(app)/settings/index.android.tsx | Replaces deprecated rootStyle/rootClassName with style/className on List. |
| apps/expo/app/(app)/messages/conversations.tsx | Updates dropdown/context menu icon names and removes deprecated icon props. |
| apps/expo/app/(app)/messages/conversations.android.tsx | Updates dropdown icon names and removes deprecated icon props. |
| apps/expo/app/(app)/messages/chat.tsx | Renames context menu ref type and updates context menu icon names. |
| apps/expo/app/(app)/messages/chat.android.tsx | Updates dropdown icon names to match new icon prop surface. |
| apps/expo/app/(app)/(tabs)/profile/name.tsx | Updates FormSection icon name for compatibility. |
| apps/expo/app/(app)/(tabs)/profile/index.tsx | Renames alert ref type and replaces success icon color with RGB literal. |
| apps/expo/app/(app)/(tabs)/(home)/index.tsx | Renames large title search bar ref type to LargeTitleSearchBarMethods. |
You can also share your feedback on Copilot code review. Take the survey.
| title: t('ai.packsGenerated'), | ||
| message: t('ai.successfullyGenerated', { count: packs.length }), | ||
| materialIcon: { name: 'backpack', color: colors.green }, | ||
| materialIcon: { name: 'bag-personal', color: 'rgb(48, 164, 108)' }, |
| {item.ratingValue && ( | ||
| <View className="flex-row items-center"> | ||
| <Icon name="star" size={16} color={colors.yellow} /> | ||
| <Icon name="star" size={16} color={'rgb(255, 204, 0)'} /> |
| {review.verified && ( | ||
| <View className="mr-2 flex-row items-center"> | ||
| <Icon name="check-circle-outline" size={14} color={colors.green} /> | ||
| <Icon name="check-circle-outline" size={14} color={'rgb(48, 164, 108)'} /> |
| {item.ratingValue && ( | ||
| <View className="flex-row items-center gap-1"> | ||
| <Icon name="star" size={12} color={colors.yellow} /> | ||
| <Icon name="star" size={12} color={'rgb(255, 204, 0)'} /> |
| <View className="mb-6"> | ||
| <View className="flex-row items-center mb-3"> | ||
| <Icon name="link" size={16} color={colors.green} /> | ||
| <Icon name="link" size={16} color={'rgb(48, 164, 108)'} /> |
| {item.ratingValue && ( | ||
| <View className="flex-row items-center"> | ||
| <Icon name="star" size={14} color={colors.yellow} /> | ||
| <Icon name="star" size={14} color={'rgb(255, 204, 0)'} /> |
Comment on lines
56
to
60
| {item.ratingValue && ( | ||
| <View className="flex-row items-center"> | ||
| <Icon name="star" size={14} color={colors.yellow} /> | ||
| <Icon name="star" size={14} color={'rgb(255, 204, 0)'} /> | ||
| <Text className="ml-1 text-xs text-muted-foreground"> | ||
| {item.ratingValue.toFixed(1)} |
Comment on lines
79
to
86
| {[1, 2, 3, 4, 5].map((star) => ( | ||
| <Icon | ||
| key={star} | ||
| name={star <= review.rating ? 'star' : 'star-outline'} | ||
| size={14} | ||
| color={colors.yellow} | ||
| color={'rgb(255, 204, 0)'} | ||
| /> | ||
| ))} |
| return isDarkColorScheme ? '#ef4444' : colors.destructive; | ||
| case 'nice-to-have': | ||
| return colors.yellow; | ||
| return 'rgb(255, 204, 0)'; |
Comment on lines
145
to
149
| {item.purchased && ( | ||
| <View className="mt-3 flex-row items-center gap-1"> | ||
| <Icon name="check-circle" size={16} color={colors.green} /> | ||
| <Icon name="check-circle" size={16} color={'rgb(48, 164, 108)'} /> | ||
| <Text variant="footnote" className="text-green-500"> | ||
| {t('shopping.purchased')} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@packrat-ai/nativewindui2.0.0 upgrade (PR fix: upgrade nativewindui dep #1982)AlertRef→AlertMethods(18 files)LargeTitleSearchBarRef→LargeTitleSearchBarMethods(4 files)ContextMenuRef→ContextMenuMethods(1 file)colors.green/colors.yellowtheme properties → hardcoded RGB valuesrootStyleandnamingSchemepropsShareimport from react-nativeSearchInputReftype mismatchTest plan
bun check-typespasses clean (0 errors)🤖 Generated with Claude Code