From f4094795d8ff8f17b299362945f4961c3e52e0b7 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Tue, 11 Nov 2025 11:17:52 -0300 Subject: [PATCH 1/3] chore: Replace Emerge's X account with Sentry's + add sentry logo + open x in safari --- ios/HackerNews/AppViewModel.swift | 6 + .../Colors/Sentry.colorset/Contents.json | 38 +++++++ .../Sentry.symbolset/Contents.json | 12 ++ .../Sentry.symbolset/Sentry.symbols.svg | 103 ++++++++++++++++++ ios/HackerNews/Localizable.xcstrings | 4 +- ios/HackerNews/Settings/SettingsScreen.swift | 15 ++- .../Common/Sources/Common/Utils/Colors.swift | 1 + 7 files changed, 169 insertions(+), 10 deletions(-) create mode 100644 ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json create mode 100644 ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json create mode 100644 ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg diff --git a/ios/HackerNews/AppViewModel.swift b/ios/HackerNews/AppViewModel.swift index 2993b9ab..6b7c32b4 100644 --- a/ios/HackerNews/AppViewModel.swift +++ b/ios/HackerNews/AppViewModel.swift @@ -233,6 +233,12 @@ final class AppViewModel { func openLink(url: URL) { navigationPath.append(AppNavigation.webLink(url: url, title: "")) } + + func openSafariLink(url: URL) { + // X.com disables WKWebview, so lets open in safari + // Safari Services doesn't play well with SwiftUI + UIApplication.shared.open(url) + } func toggleBookmark(_ item: StoryContent) { let currentStories = feedState.storiesForFeed(feedState.selectedFeed) diff --git a/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json b/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json new file mode 100644 index 00000000..89b5d889 --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Colors/Sentry.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x59", + "green" : "0x2D", + "red" : "0x36" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "1.000", + "green" : "1.000", + "red" : "1.000" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json new file mode 100644 index 00000000..99ded371 --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "Sentry.symbols.svg", + "idiom" : "universal" + } + ] +} diff --git a/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg new file mode 100644 index 00000000..8033f86a --- /dev/null +++ b/ios/HackerNews/Assets.xcassets/Sentry.symbolset/Sentry.symbols.svg @@ -0,0 +1,103 @@ + + + + + + + + + + Weight/Scale Variations + Ultralight + Thin + Light + Regular + Medium + Semibold + Bold + Heavy + Black + + + + + + + + + + + Design Variations + Symbols are supported in up to nine weights and three scales. + For optimal layout with text and other symbols, vertically align + symbols with the adjacent text. + + + + + + Margins + Leading and trailing margins on the left and right side of each symbol + can be adjusted by modifying the x-location of the margin guidelines. + Modifications are automatically applied proportionally to all + scales and weights. + + + + Exporting + Symbols should be outlined when exporting to ensure the + design is preserved when submitting to Xcode. + Template v.6.0 + Requires Xcode 16 or greater + Generated from Sentry.symbols + Typeset at 100.0 points + Small + Medium + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/HackerNews/Localizable.xcstrings b/ios/HackerNews/Localizable.xcstrings index 8b137df1..1bd3de70 100644 --- a/ios/HackerNews/Localizable.xcstrings +++ b/ios/HackerNews/Localizable.xcstrings @@ -374,13 +374,13 @@ } } }, - "settings.row.followEmerge" : { + "settings.row.followSentry" : { "extractionState" : "manual", "localizations" : { "en" : { "stringUnit" : { "state" : "translated", - "value" : "Follow Emerge" + "value" : "Follow Sentry" } } } diff --git a/ios/HackerNews/Settings/SettingsScreen.swift b/ios/HackerNews/Settings/SettingsScreen.swift index ed053887..b8277de2 100644 --- a/ios/HackerNews/Settings/SettingsScreen.swift +++ b/ios/HackerNews/Settings/SettingsScreen.swift @@ -30,11 +30,11 @@ struct SettingsScreen: View { Text("settings.section.about") .font(theme.themedFont(size: 12, style: .sans, weight: .medium)) SettingsRow( - text: String(localized: "settings.row.followEmerge"), + text: String(localized: "settings.row.followSentry"), leadingIcon: { - Image(systemName: "bird.fill") + Image("Sentry") .font(.system(size: 12)) - .foregroundStyle(.blue) + .foregroundStyle(HNColors.sentry) }, trailingIcon: { Image(systemName: "arrow.up.right") @@ -43,9 +43,8 @@ struct SettingsScreen: View { }, action: { - model.openLink( - url: URL(string: "https://www.twitter.com/emergetools")!) - + model.openSafariLink( + url: URL(string: "https://www.x.com/sentry")!) } ) @@ -63,8 +62,8 @@ struct SettingsScreen: View { }, action: { - model.openLink( - url: URL(string: "https://www.twitter.com/heyrikin")!) + model.openSafariLink( + url: URL(string: "https://www.x.com/heyrikin")!) } ) diff --git a/ios/Packages/Common/Sources/Common/Utils/Colors.swift b/ios/Packages/Common/Sources/Common/Utils/Colors.swift index 3fb8cb4d..750c21ce 100644 --- a/ios/Packages/Common/Sources/Common/Utils/Colors.swift +++ b/ios/Packages/Common/Sources/Common/Utils/Colors.swift @@ -13,4 +13,5 @@ public struct HNColors { public static let background = Color("Background") public static let commentBackground = Color("CommentBackground") public static let red = Color("HNRed") + public static let sentry = Color("Sentry") } From 92fe50cd40dce1fa097c9b8e2c293e1e05161c89 Mon Sep 17 00:00:00 2001 From: Itay Brenner Date: Tue, 11 Nov 2025 13:04:22 -0300 Subject: [PATCH 2/3] Keep Emerge X.com account --- ios/HackerNews/Localizable.xcstrings | 11 +++++++++++ ios/HackerNews/Settings/SettingsScreen.swift | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/ios/HackerNews/Localizable.xcstrings b/ios/HackerNews/Localizable.xcstrings index 1bd3de70..922ba063 100644 --- a/ios/HackerNews/Localizable.xcstrings +++ b/ios/HackerNews/Localizable.xcstrings @@ -374,6 +374,17 @@ } } }, + "settings.row.followEmerge" : { + "extractionState" : "manual", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "translated", + "value" : "Follow Emerge" + } + } + } + }, "settings.row.followSentry" : { "extractionState" : "manual", "localizations" : { diff --git a/ios/HackerNews/Settings/SettingsScreen.swift b/ios/HackerNews/Settings/SettingsScreen.swift index b8277de2..83497d74 100644 --- a/ios/HackerNews/Settings/SettingsScreen.swift +++ b/ios/HackerNews/Settings/SettingsScreen.swift @@ -29,6 +29,25 @@ struct SettingsScreen: View { VStack(alignment: .leading, spacing: 4) { Text("settings.section.about") .font(theme.themedFont(size: 12, style: .sans, weight: .medium)) + SettingsRow( + text: String(localized: "settings.row.followEmerge"), + leadingIcon: { + Image(systemName: "bird.fill") + .font(.system(size: 12)) + .foregroundStyle(.blue) + }, + trailingIcon: { + Image(systemName: "arrow.up.right") + .font(.system(size: 12)) + .foregroundStyle(.onBackground) + + }, + action: { + model.openSafariLink( + url: URL(string: "https://www.x.com/emergetools")!) + } + ) + SettingsRow( text: String(localized: "settings.row.followSentry"), leadingIcon: { From c0c33d1584be2c3298853cfacbd74d5fa467fd28 Mon Sep 17 00:00:00 2001 From: Nico Hinderling Date: Thu, 13 Nov 2025 09:58:54 -0800 Subject: [PATCH 3/3] [DNM] test fake snapshot auto-approval --- ios/HackerNews/Settings/SettingsScreen.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/HackerNews/Settings/SettingsScreen.swift b/ios/HackerNews/Settings/SettingsScreen.swift index 83497d74..0f5adfb5 100644 --- a/ios/HackerNews/Settings/SettingsScreen.swift +++ b/ios/HackerNews/Settings/SettingsScreen.swift @@ -49,7 +49,7 @@ struct SettingsScreen: View { ) SettingsRow( - text: String(localized: "settings.row.followSentry"), + text: "Fake text dont land", leadingIcon: { Image("Sentry") .font(.system(size: 12))