# Zeego → @react-native-menu/menu Migration TODO
## ✅ Completed
### Phase 1: Dependencies & Setup
- [x] Zeego uninstalled
- [x] Utility components created (NativeMenu, menuActions, menuBuilder)
- [x] All imports replaced with `import { MenuView } from '@react-native-menu/menu';`
### Phase 2: Simple Migrations
- [x] `features/menus/HeaderMenu.tsx`
- [x] `features/menus/MemoMenu.tsx`
- [x] `features/menus/MemoHeaderMenu.tsx`
- [x] `components/organisms/Memory.tsx`
## 🔄 In Progress - Need Code Replacement
Die folgenden 5 Komponenten haben bereits den Import ersetzt, aber die `ContextMenu.Root`, `ContextMenu.Trigger`, `DropdownMenu.Root` etc. müssen noch durch `MenuView` ersetzt werden:
### 1. components/molecules/MemoPreview.tsx
**Type:** Context Menu (Long Press)
**Lines:** 881-919
**Special:** Has `ContextMenu.Preview` - muss durch MenuView ohne Preview ersetzt werden
**Pattern:**
```tsx
// Zeile 881-919 ersetzen
...
...
{menuItems.map((item) => (
...
))}
// Wird zu:
({
id: item.key,
title: item.title,
image: Platform.select({
ios: item.systemIcon,
android: `ic_menu_${item.key}`,
}),
attributes: item.destructive ? { destructive: true } : undefined,
}))}
onPressAction={({ nativeEvent }) => {
const selectedItem = menuItems.find(item => item.key === nativeEvent.event);
selectedItem?.onSelect?.();
}}
shouldOpenOnLongPress={true} // Context Menu
>
{/* Content ohne Preview */}
```
**Note:** ContextMenu.Preview wird nicht von @react-native-menu/menu unterstützt - einfach weglassen.
---
### 2. components/molecules/PromptPreview.tsx
**Type:** Context Menu (Long Press)
**Lines:** Suche nach `ContextMenu.Root`
**Pattern:** Gleich wie MemoPreview, aber ohne Preview
---
### 3. components/atoms/Pill.tsx
**Type:** Dropdown Menu (Tap) für Context Menu Funktionalität
**Lines:** Suche nach `DropdownMenu.Root` oder `ContextMenu.Root`
**Pattern:** shouldOpenOnLongPress={true} für Context Menu verhalten
---
### 4. components/molecules/TableOfContentsMenu.tsx
**Type:** Dropdown Menu (Tap)
**Lines:** Suche nach `DropdownMenu.Root`
**Pattern:**
```tsx
{children}
```
---
### 5. features/subscription/SubscriptionMenu.tsx
**Type:** Dropdown Menu (Tap)
**Lines:** Suche nach `DropdownMenu.Root`
**Pattern:** shouldOpenOnLongPress={false}
---
## Quick Find & Replace Patterns
### Pattern 1: Simple ContextMenu (ohne Preview)
```bash
# Find:
{TRIGGER_CONTENT}
{menuItems.map((item) => (
{item.title}
))}
# Replace with:
({
id: item.key,
title: item.title,
image: Platform.select({ ios: item.systemIcon, android: `ic_menu_${item.key}` }),
attributes: item.destructive ? { destructive: true } : undefined,
}))}
onPressAction={({ nativeEvent }) => {
const selectedItem = menuItems.find(item => item.key === nativeEvent.event);
selectedItem?.onSelect?.();
}}
shouldOpenOnLongPress={true}
>
{TRIGGER_CONTENT}
```
### Pattern 2: Simple DropdownMenu
```bash
# Find:
...
...
# Replace with:
...
```
## Commands to Find Remaining Work
```bash
# Find all ContextMenu usage
grep -rn "ContextMenu\." components/ features/ --include="*.tsx" | grep -v node_modules
# Find all DropdownMenu usage
grep -rn "DropdownMenu\." components/ features/ --include="*.tsx" | grep -v node_modules
# Test if any zeego imports remain
grep -rn "from 'zeego" components/ features/ --include="*.tsx" | grep -v node_modules
```
## Test Commands
```bash
# Clean rebuild
npx expo prebuild --clean
# Start iOS
npx expo run:ios
# Start Android
npx expo run:android
```
---
**Status:** 4/15 Komponenten vollständig migriert, 5 haben Import ersetzt aber benötigen Code-Replacement
**Next:** Code-Replacement in den 5 verbleibenden Komponenten