Skip to content

Refactor layouts and improve resource functionality across views#5

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

Refactor layouts and improve resource functionality across views#5
algotyrnt merged 12 commits intomainfrom
dev

Conversation

@algotyrnt
Copy link
Owner

This pull request introduces significant improvements to the Beacon app's UI, resource content, and user experience. The most notable changes include a major update to the emergency resources data, enhanced presentation and search functionality for resources, improved map visualization and peer status indicators, and UI refinements for better clarity and accessibility. Additionally, some code cleanup and configuration corrections were made.

Emergency Resource Content & Presentation

  • Expanded and updated resourcesData in ResourcesData.swift with more detailed, actionable, and referenced emergency instructions, covering cyclone preparedness, CPR, bleeding, water purification, and more.
  • Improved ResourceCard and ResourceDetailView layouts for better readability, including multiline titles/subtitles, increased icon sizes, and scrollable detail views. [1] [2]

Resource Discovery & Interaction

  • Added search functionality to ResourcesView, allowing users to filter resources by title, subtitle, or details. Includes animated transitions and a "no results" state.

Map & Peer Visualization

  • Enhanced BeaconView by using the new MapCameraPosition, improving peer and self-annotations with clearer visuals, and adding a prominent "HELP!!!" indicator for peers needing assistance. Control panel placement was improved for accessibility. [1] [2]

Home Screen UI Refinements

  • Redesigned HomeView hero section with larger icons and better spacing, moved status cards outside the activation card for clarity, and removed the "Quick Tips" section for a cleaner layout. [1] [2]

Code Cleanup & Configuration

  • Removed the unused TipRow.swift file and corrected package configuration fields in Package.swift. [1] [2] [3]

Let me know if you want to discuss any specific change in detail!

@algotyrnt algotyrnt self-assigned this Feb 27, 2026
Copilot AI review requested due to automatic review settings February 27, 2026 06:27
@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 refactors multiple SwiftUI views in the Beacon app to improve resource discovery and presentation, update emergency resource content, and refine the Home/Map UI.

Changes:

  • Added searchable filtering + “no results” state to the Resources screen, and updated resource card/detail layouts for readability.
  • Refreshed BeaconView map presentation using MapCameraPosition and improved peer/self annotations (including a “HELP!!!” indicator).
  • Reworked HomeView layout (hero + status + activation), removed quick tips UI, deleted TipRow, and adjusted Package.swift configuration fields.

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
Beacon.swiftpm/Views/ResourcesView.swift Adds search + filtering and a no-results view; switches resource selection to button-based interaction.
Beacon.swiftpm/Views/ResourceDetailView.swift Improves resource detail layout with a scrollable presentation and adds subtitle display.
Beacon.swiftpm/Views/HomeView.swift Refactors hero/status/activation layout and removes the tips section.
Beacon.swiftpm/Views/BeaconView.swift Moves to Map(position:) with MapCameraPosition and enhances annotations + control panel placement.
Beacon.swiftpm/Package.swift Updates supported orientations and changes Swift language configuration field.
Beacon.swiftpm/Data/ResourcesData.swift Replaces/expands emergency resource content with more detailed instructions and references.
Beacon.swiftpm/Components/TipRow.swift Removes unused tip row component.
Beacon.swiftpm/Components/ResourceCard.swift Improves card layout for multi-line titles/subtitles and adjusts sizing.
Comments suppressed due to low confidence (2)

Beacon.swiftpm/Views/HomeView.swift:34

  • HomeView no longer scrolls, but the hero section is constrained with .frame(maxHeight: .infinity) and contains Spacer()s. This combination can cause the hero to consume all available vertical space and push the status/activation cards off-screen (especially on smaller devices or with larger Dynamic Type), with no way to reach them. Consider restoring a ScrollView, or removing the infinite-height frame/spacers and letting the hero size to its contents (or sizing it proportionally via GeometryReader).
                VStack {
                    Spacer()
                    Image(systemName: "antenna.radiowaves.left.and.right")
                        .font(.system(size: 120))
                        .foregroundStyle(.blue)
                    Spacer()
                    VStack(spacing: 8) {
                        Text("Beacon")
                            .font(.largeTitle.bold())
                        Text("Offline emergency network")
                            .foregroundStyle(.secondary)
                    }
                }
                .frame(maxHeight: .infinity)
                

Beacon.swiftpm/Package.swift:47

  • This manifest is marked as auto-generated (“Do not edit it by hand…”). Changing fields here (e.g., swiftLanguageModes) risks being overwritten by the generator/tooling and causing recurring diffs. If this change is required, update the source-of-truth that generates Package.swift (or document the regeneration steps) so the configuration stays stable.
            path: "."
        )
    ],
    swiftLanguageModes: [.version("6")]
)

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

@algotyrnt algotyrnt merged commit 7de73b1 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