From 358bdb93ea4d04e77c3c861a36ab076e6982f144 Mon Sep 17 00:00:00 2001 From: Linus Rath <139418639+rathlinus@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:04:47 +0200 Subject: [PATCH] feat: bucket the contact index by any letter, add select-all/export, a shared-from drawer section and category rename --- .../contacts/ContactsSidebarDrawer.tsx | 257 ++++++++++++++---- src/screens/ContactsScreen.tsx | 80 +++++- 2 files changed, 277 insertions(+), 60 deletions(-) diff --git a/src/components/contacts/ContactsSidebarDrawer.tsx b/src/components/contacts/ContactsSidebarDrawer.tsx index 56339ab5..0f1b0524 100644 --- a/src/components/contacts/ContactsSidebarDrawer.tsx +++ b/src/components/contacts/ContactsSidebarDrawer.tsx @@ -1,17 +1,23 @@ import React from 'react'; import { - View, Text, StyleSheet, Pressable, ScrollView, Modal, Animated, Dimensions, Easing, + View, Text, StyleSheet, Pressable, ScrollView, Modal, Animated, Dimensions, Easing, TextInput, Alert, } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; +import { useNavigation } from '@react-navigation/native'; +import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; import { - X, Users, Tag, BookUser, Inbox, ChevronDown, ChevronRight, + X, Users, Tag, BookUser, Inbox, ChevronDown, ChevronRight, Plus, Share2, Check, } from 'lucide-react-native'; +import type { RootStackParamList } from '../../navigation/types'; +import type { AddressBook } from '../../api/types'; import type { ContactCategory } from '../../stores/contacts-store'; -import { useContactsStore } from '../../stores/contacts-store'; +import { useContactsStore, selectGroupMembers, selectUncategorized } from '../../stores/contacts-store'; import { getContactDisplayName, getContactKeywords, isGroup } from '../../lib/contact-utils'; -import { spacing, radius, typography, type ThemePalette } from '../../theme/tokens'; +import { spacing, radius, typography, componentSizes, type ThemePalette } from '../../theme/tokens'; import { useColors } from '../../theme/colors'; +type Nav = NativeStackNavigationProp; + interface Props { visible: boolean; onClose: () => void; @@ -28,10 +34,12 @@ function isSameCategory(a: ContactCategory, b: ContactCategory): boolean { export default function ContactsSidebarDrawer({ visible, onClose }: Props) { const c = useColors(); const styles = React.useMemo(() => makeStyles(c), [c]); + const navigation = useNavigation