Conversation
…ove resource filtering
…dd new safety guidelines
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
resourcesDataarray 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.ResourceCardcomponent 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.ResourceDetailViewnow uses a scrollable layout, increases icon size, improves text alignment, and adds visual padding for a more polished and accessible presentation.Resource Browsing Experience:
ResourcesViewadds 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:
BeaconViewmap 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]