Skip to content

[WIP] apps/expo/features/packs/screens/PackDetailScreen.tsx Add a step to specify activity in gap analysis and use that as triptype instead of pack.category. Should be skippable but either it or location must be chosen.#1725

Draft
Copilot wants to merge 3 commits intodevelopmentfrom
copilot/fix-bed75410-f5f6-446d-985a-9ae4f21fdc87

Conversation

Copy link
Contributor

Copilot AI commented Sep 22, 2025

  • Analyze current gap analysis flow in PackDetailScreen.tsx
  • Understand current location picker implementation
  • Review existing pack categories and types
  • Create ActivityPicker component similar to LocationPicker
  • Add activity state management to PackDetailScreen
  • Modify gap analysis flow to include activity selection step
  • Update gap analysis request to use activity instead of pack.category
  • Implement validation logic (either activity or location must be chosen)
  • Test the complete flow to ensure it works correctly
  • Update types to support the new activity flow
  • Expand activity list with comprehensive outdoor activities
  • Update icon usage to proper iOS/MaterialIcon pattern

Final Implementation Complete ✅

Recent Updates (addressing feedback):

  1. Expanded Activity List: Added 11 new activity types:

    • Cycling, Running, Fishing, Hunting
    • Photography, Ultralight, Expedition
    • Canyoneering, Caving, Survival, Bushcraft
    • Total: 20 comprehensive outdoor activities
  2. Updated Icon Pattern: Switched from simple string names to proper structured format:

    icon: {
      ios: { name: 'figure.walk' },
      materialIcon: { type: 'MaterialCommunityIcons', name: 'walk' }
    }
  3. Enhanced Type Safety:

    • Removed as any type assertions
    • Proper TypeScript support for icon props
    • Updated PackCategorySchema with all new activities

Technical Changes:

ActivityPicker.tsx:

  • Added 11 new activity types with appropriate icons and descriptions
  • Updated icon usage from name={icon as any} to structured ios={} materialIcon={} format
  • Each activity now has both iOS SF Symbols and Material Community Icons

Types:

  • Updated PackCategorySchema enum with comprehensive outdoor activities
  • Maintains backwards compatibility with existing categories

Quality Assurance:

✅ Code formatting applied (Biome)
✅ Linting passed with no new warnings
✅ 20 comprehensive outdoor activities available
✅ Proper icon structure following project patterns


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@cloudflare-workers-and-pages
Copy link
Contributor

Deploying packrat-guides with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2dd45e6
Status: ✅  Deploy successful!
Preview URL: https://27b95f33.packrat-guides-6gq.pages.dev
Branch Preview URL: https://copilot-fix-bed75410-f5f6-44.packrat-guides-6gq.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Contributor

Deploying packrat-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2dd45e6
Status: ✅  Deploy successful!
Preview URL: https://f5386c2b.packrat-landing.pages.dev
Branch Preview URL: https://copilot-fix-bed75410-f5f6-44.packrat-landing.pages.dev

View logs

Copilot AI and others added 2 commits September 22, 2025 07:46
…analysis

Co-authored-by: mikib0 <54102880+mikib0@users.noreply.github.com>
…lementation

Co-authored-by: mikib0 <54102880+mikib0@users.noreply.github.com>
@mikib0
Copy link
Collaborator

mikib0 commented Sep 22, 2025

@copilot

  • expand list with comprehensive activities
  • switch icon usage to {
    ios: { name: 'exclamationmark.triangle.fill' as const }, // sf-symbol icon name
    materialIcon: {
    type: 'MaterialCommunityIcons' as const, // type = material icons/material community icons
    name: 'alert-circle' as const, // icon from material icons/material community icons
    },
    }

Copy link
Contributor Author

Copilot AI commented Sep 22, 2025

@copilot

  • expand list with comprehensive activities
  • switch icon usage to {
    ...

I've expanded the activity list from 9 to 20 comprehensive outdoor activities and updated the icon usage to the proper pattern you specified.

Expanded activities now include:

  • Original: hiking, backpacking, camping, climbing, winter, skiing, water sports, desert, custom
  • Added: cycling, running, fishing, hunting, photography, ultralight, expedition, canyoneering, caving, survival, bushcraft

Updated icon structure from simple strings to:

icon: {
  ios: { name: 'figure.walk' },
  materialIcon: { type: 'MaterialCommunityIcons', name: 'walk' }
}

This follows the pattern you specified and removes the as any type assertions. Each activity now has appropriate iOS SF Symbols and Material Community Icons for better cross-platform compatibility.

Commit: Latest commit with expanded activities and proper icon pattern

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.

2 participants