-
Notifications
You must be signed in to change notification settings - Fork 48
Fix: Safari view UI mode and Settings page external links #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added Environment property to track colorScheme in SafariView - Safari view controller now inherits interface style from root view controller - Properly handles system, light, and dark appearance modes - Sets appropriate tint colors based on effective UI style 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replaced WebBrowserView and SafariWebView with direct SafariView usage - Added IdentifiableURL wrapper to support sheet presentation - Eliminated empty intermediate pages when opening external links - All external links now open in SafariView with proper UI mode support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this 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 fixes Safari view appearance to respect the app's UI mode settings and streamlines external link handling in the Settings page by removing intermediate views.
- Safari view now properly inherits and applies the current UI mode (light/dark/system)
- Settings page external links use direct SafariView presentation instead of intermediate web views
- Eliminated empty pages that appeared when opening external links
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| V2er/View/Settings/SettingsPage.swift | Replaced web view components with direct SafariView usage and added IdentifiableURL wrapper for sheet presentation |
| V2er/General/Extentions.swift | Enhanced SafariView to track color scheme and apply appropriate UI styles and tint colors |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| if effectiveStyle { | ||
| // Dark mode colors | ||
| safariVC.preferredControlTintColor = UIColor.systemBlue | ||
| safariVC.preferredBarTintColor = UIColor.systemBackground | ||
| } else { | ||
| // Light mode colors | ||
| safariVC.preferredControlTintColor = UIColor.systemBlue | ||
| safariVC.preferredBarTintColor = UIColor.systemBackground | ||
| } |
Copilot
AI
Sep 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tint color configuration is identical for both dark and light modes. This duplicated logic should be extracted outside the conditional or the conditional should be removed entirely since both branches set the same values.
| if effectiveStyle { | |
| // Dark mode colors | |
| safariVC.preferredControlTintColor = UIColor.systemBlue | |
| safariVC.preferredBarTintColor = UIColor.systemBackground | |
| } else { | |
| // Light mode colors | |
| safariVC.preferredControlTintColor = UIColor.systemBlue | |
| safariVC.preferredBarTintColor = UIColor.systemBackground | |
| } | |
| // Tint color configuration is identical for both dark and light modes | |
| safariVC.preferredControlTintColor = UIColor.systemBlue | |
| safariVC.preferredBarTintColor = UIColor.systemBackground |
Code Coverage Report ❌Current coverage: 0% |
Summary
Changes
Safari View UI Mode Support
@Environment(\.colorScheme)to track current color schemeSettings Page External Links
Test Plan
🤖 Generated with Claude Code