managarten/apps-archived/reader/apps/mobile/CONTEXT_MENU_SOLUTION.md
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

1.9 KiB

Context Menu Solution

I've fixed the "View config not found for component 'ContextMenu'" error by replacing the native react-native-context-menu-view with a cross-platform solution that works with Expo Go.

What was changed:

  1. Removed the native dependency: Uninstalled react-native-context-menu-view which requires native code and doesn't work with Expo Go.

  2. Created two alternative solutions:

Option 1: ActionMenu (Currently Active)

  • Located in /components/ActionMenu.tsx
  • Uses native ActionSheetIOS on iOS for a truly native experience
  • Custom modal implementation for Android that slides up from bottom
  • Triggered by long press on list items

Option 2: ContextMenu (Alternative)

  • Located in /components/ContextMenu.tsx
  • Custom modal-based context menu that appears near the pressed item
  • Works on both platforms with consistent behavior
  • More traditional context menu appearance

How it works:

The ActionMenu component wraps your list items and provides a long-press gesture handler. When activated:

  • On iOS: Shows native ActionSheetIOS
  • On Android: Shows a custom bottom sheet modal

Usage:

<ActionMenu
	options={[
		{ title: 'Open', systemIcon: 'doc.text' },
		{ title: 'Share', systemIcon: 'square.and.arrow.up' },
		{ title: 'Delete', systemIcon: 'trash', destructive: true },
	]}
	onSelect={(index) => {
		// Handle selection
	}}
>
	<YourComponent />
</ActionMenu>

Benefits:

  • Works with Expo Go (no development build required)
  • Native feel on iOS
  • Consistent experience across platforms
  • No native dependencies

If you need a development build:

If you prefer to use the native context menu and are willing to use a development build:

  1. Re-install react-native-context-menu-view
  2. Run npx expo prebuild
  3. Run npx expo run:ios or npx expo run:android

The current solution allows you to continue using Expo Go for development while providing a good user experience.