Skip to content

Refactor layouts and improve functionality across resource views#4

Merged
algotyrnt merged 6 commits intomainfrom
dev
Feb 27, 2026
Merged

Refactor layouts and improve functionality across resource views#4
algotyrnt merged 6 commits intomainfrom
dev

Conversation

@algotyrnt
Copy link
Owner

This pull request enhances the user experience and content quality in the resource and map features of the app. It introduces a comprehensive update to the emergency resources, improves the visual layout and usability of resource cards and details, and adds search functionality to the resources view. On the map, peer and user annotations are visually improved, and a clearer indication is provided for peers requesting help.

Resource Content and UI Improvements:

  • The resourcesData array is completely overhauled with more detailed, actionable, and authoritative emergency resources, expanding coverage to topics like cyclone preparedness, severe bleeding, CPR, shock, carbon monoxide safety, snake bites, fractures, drowning, and evacuation kits. Each entry now includes references to reputable organizations.
  • The ResourceCard component layout is refined for better readability: icon size is increased, spacing is adjusted, text is center-aligned with line limits, and the card expands to fill available space.
  • The ResourceDetailView now uses a scrollable layout, increases icon size, improves text alignment, and adds visual padding for a more polished and accessible presentation.

Resource Browsing Experience:

  • The ResourcesView adds a search bar for filtering resources by title, subtitle, or details, switches resource cards to use buttons for better accessibility, and improves grid spacing and background color for a modern look.

Map and Peer Annotation Enhancements:

  • The BeaconView map now uses a stateful camera position, visually enhances user and peer annotations with colored circles, white outlines, and shadows, and adds a prominent "HELP" label above peers requesting assistance. The map layout is streamlined and the control panel is inset for better usability. [1] [2]

Copilot AI review requested due to automatic review settings February 27, 2026 03:10
@algotyrnt algotyrnt self-assigned this Feb 27, 2026
@algotyrnt algotyrnt added the enhancement New feature or request label Feb 27, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR comprehensively refactors the emergency resources feature with improved content, search functionality, and visual enhancements across resource views and the map interface. The changes focus on making emergency resources more detailed and actionable while improving the user experience through better layouts and visual indicators.

Changes:

  • Added search functionality to filter emergency resources by title, subtitle, or details
  • Completely overhauled resource content with 12 detailed, authoritative emergency guides covering cyclones, first aid, water safety, and more
  • Enhanced map annotations with visual improvements (white outlines, shadows) and prominent "HELP" labels for peers requesting assistance

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ResourcesView.swift Added search bar and filtering logic, switched to button-based cards for better accessibility, improved grid spacing
ResourceDetailView.swift Added ScrollView wrapper, increased icon size, improved text alignment and spacing, added subtitle display
BeaconView.swift Introduced stateful camera position, enhanced annotation visuals with colored circles and outlines, added prominent "HELP" indicator for peers requesting help
ResourcesData.swift Replaced all 5 basic resources with 12 comprehensive emergency guides with detailed instructions and authoritative references
ResourceCard.swift Increased icon size, added center alignment and line limits for text, adjusted spacing and frame constraints
Comments suppressed due to low confidence (2)

Beacon.swiftpm/Views/ResourcesView.swift:50

  • The search prompt should be capitalized to "Search" for consistency with standard iOS conventions and the capitalized navigation title "Resources" on line 48. User-facing strings should follow title case conventions for prompts.
            .searchable(text: $searchText, prompt: "search")

Beacon.swiftpm/Views/ResourceDetailView.swift:30

  • The subtitle text in ResourceDetailView should include multilineTextAlignment(.center) to match the title alignment on line 26. Currently the subtitle defaults to leading alignment while the title is centered, creating visual inconsistency in the header section.
                    Text(resource.subtitle)
                        .font(.title3)
                        .foregroundStyle(.secondary)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@algotyrnt algotyrnt merged commit c20ed49 into main Feb 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants