Skip to content

feat: Settings to choose favicon provider (Google vs DuckDuckGo) #3

@dernerl

Description

@dernerl

⚙️ Feature Request

Add setting to let users choose between Google and DuckDuckGo favicon services.

Motivation

Privacy Considerations:

  • Google Favicon Service: More reliable, but tracks requests
  • DuckDuckGo Favicon Service: Privacy-focused, no tracking

Implementation

1. Add Setting in SettingsView

Picker("Favicon Provider", selection: $faviconProvider) {
    Text("Google").tag(FaviconProvider.google)
    Text("DuckDuckGo (Privacy)").tag(FaviconProvider.duckduckgo)
}

2. Favicon Provider Enum

enum FaviconProvider: String, CaseIterable, Identifiable {
    case google = "Google"
    case duckduckgo = "DuckDuckGo"
    
    var id: String { rawValue }
    
    func faviconURL(for domain: String) -> URL? {
        switch self {
        case .google:
            return URL(string: "https://www.google.com/s2/favicons?domain=\(domain)&sz=32")
        case .duckduckgo:
            return URL(string: "https://icons.duckduckgo.com/ip3/\(domain).ico")
        }
    }
}

3. AppStorage Integration

@AppStorage("faviconProvider") private var faviconProvider: FaviconProvider = .google

4. Update FavoriteRowView

  • Read provider from AppStorage
  • Use provider-specific URL

API Endpoints

Google:

  • URL: https://www.google.com/s2/favicons?domain={domain}&sz=32
  • Sizes: 16, 32, 64, 128
  • Reliable, comprehensive

DuckDuckGo:

  • URL: https://icons.duckduckgo.com/ip3/{domain}.ico
  • Fixed size
  • Privacy-focused, no tracking

UI/UX

Settings Panel:

Settings
  └─ Appearance
       ├─ Favicon Provider: [Google ▼]
       └─ ⓘ DuckDuckGo option respects privacy

Acceptance Criteria

  • Setting in Settings panel (⌘,)
  • Default: Google (more reliable)
  • Switching updates immediately
  • Privacy info tooltip for DuckDuckGo
  • Persisted via AppStorage
  • Works with existing favicon implementation

Dependencies

  • Requires: Basic favicon implementation (#TBD)

Priority

  • Medium - Nice feature for privacy-conscious users

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions