From f7f0135ab61fe53b0221b0e5bb458a3e881e53df Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sat, 21 Jun 2025 23:05:22 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=F0=9F=94=A7=20Fixes=20config=20files=20for?= =?UTF-8?q?=20i-platforms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xcconfig/NetNewsWire_iOSapp_target.xcconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/xcconfig/NetNewsWire_iOSapp_target.xcconfig b/xcconfig/NetNewsWire_iOSapp_target.xcconfig index cd5380c77..10400c2ad 100644 --- a/xcconfig/NetNewsWire_iOSapp_target.xcconfig +++ b/xcconfig/NetNewsWire_iOSapp_target.xcconfig @@ -44,8 +44,7 @@ PRODUCT_NAME = NetNewsWire CLANG_ENABLE_MODULES = YES SWIFT_OBJC_BRIDGING_HEADER = iOS/Resources/NetNewsWire-iOS-Bridging-Header.h SWIFT_VERSION = 5.7 -SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; -SUPPORTS_MACCATALYST = NO; -SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; -SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO; -TARGETED_DEVICE_FAMILY = "1,2"; +SUPPORTED_PLATFORMS = iphoneos iphonesimulator +SUPPORTS_MACCATALYST = NO +SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO +SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD = NO From 255d23864668f1c88b84c3c8b6e88db5adb671ae Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sat, 21 Jun 2025 23:05:55 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Rename=20`isRefreshSch?= =?UTF-8?q?eduled`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iOS/SceneCoordinator.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 71c9e5efd..360d9cba3 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -85,7 +85,7 @@ class SceneCoordinator: NSObject, UndoableCommandRunner { var isArticleViewControllerPending = false /// `Bool` to track whether a refresh is scheduled. - private var isRefreshScheduled: Bool = false + private var isNavigationBarSubtitleRefreshScheduled: Bool = false private(set) var sortDirection = AppDefaults.shared.timelineSortDirection { didSet { @@ -628,12 +628,12 @@ class SceneCoordinator: NSObject, UndoableCommandRunner { } func scheduleNavigationBarSubtitleUpdate() { - if isRefreshScheduled { + if isNavigationBarSubtitleRefreshScheduled { return } - isRefreshScheduled = true + isNavigationBarSubtitleRefreshScheduled = true DispatchQueue.main.asyncAfter(deadline: .now() + 60) { [weak self] in - self?.isRefreshScheduled = false + self?.isNavigationBarSubtitleRefreshScheduled = false self?.updateNavigationBarSubtitles(nil) } } From 14384e6ad5cd805041f3edf8e27f64a9f54ba556 Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sat, 21 Jun 2025 23:31:02 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=F0=9F=92=84=20Modernise=20Sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Cell/MainFeedTableViewSectionHeader.swift | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift index d113dc0b8..eefff6f09 100644 --- a/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift +++ b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift @@ -95,17 +95,6 @@ class MainFeedTableViewSectionHeader: UITableViewHeaderFooterView { return button }() - private let topSeparatorView: UIView = { - let view = UIView() - view.backgroundColor = UIColor.separator - return view - }() - - private let bottomSeparatorView: UIView = { - let view = UIView() - view.backgroundColor = UIColor.separator - return view - }() override init(reuseIdentifier: String?) { super.init(reuseIdentifier: reuseIdentifier) @@ -145,15 +134,9 @@ private extension MainFeedTableViewSectionHeader { addSubviewAtInit(titleView) addSubviewAtInit(disclosureButton) updateExpandedState(animate: false) - addBackgroundView() - addSubviewAtInit(topSeparatorView) - addSubviewAtInit(bottomSeparatorView) } func updateExpandedState(animate: Bool) { - if !isLastSection && self.disclosureExpanded { - self.bottomSeparatorView.isHidden = false - } let duration = animate ? 0.3 : 0.0 @@ -166,9 +149,6 @@ private extension MainFeedTableViewSectionHeader { self.disclosureButton.transform = CGAffineTransform(rotationAngle: 0) } }, completion: { _ in - if !self.isLastSection && !self.disclosureExpanded { - self.bottomSeparatorView.isHidden = true - } }) } @@ -193,21 +173,6 @@ private extension MainFeedTableViewSectionHeader { titleView.setFrameIfNotEqual(layout.titleRect) unreadCountView.setFrameIfNotEqual(layout.unreadCountRect) disclosureButton.setFrameIfNotEqual(layout.disclosureButtonRect) - - let x = -safeAreaInsets.left - let width = safeAreaInsets.left + safeAreaInsets.right + frame.width - let height = 0.33 - - let top = CGRect(x: x, y: 0, width: width, height: height) - topSeparatorView.setFrameIfNotEqual(top) - - let bottom = CGRect(x: x, y: frame.height - height, width: width, height: height) - bottomSeparatorView.setFrameIfNotEqual(bottom) - } - - func addBackgroundView() { - self.backgroundView = UIView(frame: self.bounds) - self.backgroundView?.backgroundColor = AppAssets.sectionHeaderColor } } From 58e2060fc337b9767fa52dfb85faacba28509135 Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sun, 22 Jun 2025 07:53:53 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=F0=9F=92=84=20Make=20macOS=20timeline=20sw?= =?UTF-8?q?ipe=20under=20sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4670 --- Mac/MainWindow/MainWindowController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/Mac/MainWindow/MainWindowController.swift b/Mac/MainWindow/MainWindowController.swift index 0f90b85b1..40e961e35 100644 --- a/Mac/MainWindow/MainWindowController.swift +++ b/Mac/MainWindow/MainWindowController.swift @@ -90,6 +90,7 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations { timelineContainerViewController = splitViewController?.splitViewItems[1].viewController as? TimelineContainerViewController timelineContainerViewController!.delegate = self + splitViewController?.splitViewItems[1].automaticallyAdjustsSafeAreaInsets = true detailViewController = splitViewController?.splitViewItems[2].viewController as? DetailViewController From 5d750facd36a70d96a658974c0eb866e9ac145e3 Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sun, 22 Jun 2025 07:55:53 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=F0=9F=92=84=20Improve=20legibility=20of=20?= =?UTF-8?q?unread=20count=20on=20macOS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mac/MainWindow/Sidebar/UnreadCountView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mac/MainWindow/Sidebar/UnreadCountView.swift b/Mac/MainWindow/Sidebar/UnreadCountView.swift index 75ab94e6b..dda16e165 100644 --- a/Mac/MainWindow/Sidebar/UnreadCountView.swift +++ b/Mac/MainWindow/Sidebar/UnreadCountView.swift @@ -35,7 +35,7 @@ class UnreadCountView : NSView { } private var currentTextColor: NSColor { - return isSelected ? NSColor.white : NSColor.tertiaryLabelColor + return isSelected ? NSColor.white : NSColor.secondaryLabelColor } private var textAttributes: [NSAttributedString.Key: AnyObject] { From 0b0eef0696d5aed0ca55d7ae86bdb2373a28b158 Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sun, 22 Jun 2025 13:37:40 +0800 Subject: [PATCH 6/7] =?UTF-8?q?Revert=20"=F0=9F=92=84=20Modernise=20Sideba?= =?UTF-8?q?r"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Unwind previous commit This reverts commit 14384e6ad5cd805041f3edf8e27f64a9f54ba556. --- .../Cell/MainFeedTableViewSectionHeader.swift | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift index eefff6f09..d113dc0b8 100644 --- a/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift +++ b/iOS/MainFeed/Cell/MainFeedTableViewSectionHeader.swift @@ -95,6 +95,17 @@ class MainFeedTableViewSectionHeader: UITableViewHeaderFooterView { return button }() + private let topSeparatorView: UIView = { + let view = UIView() + view.backgroundColor = UIColor.separator + return view + }() + + private let bottomSeparatorView: UIView = { + let view = UIView() + view.backgroundColor = UIColor.separator + return view + }() override init(reuseIdentifier: String?) { super.init(reuseIdentifier: reuseIdentifier) @@ -134,9 +145,15 @@ private extension MainFeedTableViewSectionHeader { addSubviewAtInit(titleView) addSubviewAtInit(disclosureButton) updateExpandedState(animate: false) + addBackgroundView() + addSubviewAtInit(topSeparatorView) + addSubviewAtInit(bottomSeparatorView) } func updateExpandedState(animate: Bool) { + if !isLastSection && self.disclosureExpanded { + self.bottomSeparatorView.isHidden = false + } let duration = animate ? 0.3 : 0.0 @@ -149,6 +166,9 @@ private extension MainFeedTableViewSectionHeader { self.disclosureButton.transform = CGAffineTransform(rotationAngle: 0) } }, completion: { _ in + if !self.isLastSection && !self.disclosureExpanded { + self.bottomSeparatorView.isHidden = true + } }) } @@ -173,6 +193,21 @@ private extension MainFeedTableViewSectionHeader { titleView.setFrameIfNotEqual(layout.titleRect) unreadCountView.setFrameIfNotEqual(layout.unreadCountRect) disclosureButton.setFrameIfNotEqual(layout.disclosureButtonRect) + + let x = -safeAreaInsets.left + let width = safeAreaInsets.left + safeAreaInsets.right + frame.width + let height = 0.33 + + let top = CGRect(x: x, y: 0, width: width, height: height) + topSeparatorView.setFrameIfNotEqual(top) + + let bottom = CGRect(x: x, y: frame.height - height, width: width, height: height) + bottomSeparatorView.setFrameIfNotEqual(bottom) + } + + func addBackgroundView() { + self.backgroundView = UIView(frame: self.bounds) + self.backgroundView?.backgroundColor = AppAssets.sectionHeaderColor } } From 39991d187c778bf843ad367d20c53cb50a8b9a0a Mon Sep 17 00:00:00 2001 From: Stuar Breckenridge Date: Sun, 22 Jun 2025 22:45:59 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=F0=9F=92=84=20Adds=20missing=20images=20fo?= =?UTF-8?q?r=20mark=20above/below=20as=20read?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mac/AppAssets.swift | 10 ++ ...melineViewController+ContextualMenus.swift | 4 +- .../markAboveAsRead.symbolset/Contents.json | 12 ++ .../markAsReadAbove.svg | 159 ++++++++++++++++++ .../markBelowAsRead.symbolset/Contents.json | 12 ++ .../markBelowAsRead.svg | 159 ++++++++++++++++++ 6 files changed, 354 insertions(+), 2 deletions(-) create mode 100644 Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json create mode 100644 Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg create mode 100644 Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json create mode 100644 Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg diff --git a/Mac/AppAssets.swift b/Mac/AppAssets.swift index cefbe0423..eb7f24dbb 100644 --- a/Mac/AppAssets.swift +++ b/Mac/AppAssets.swift @@ -161,6 +161,16 @@ struct AppAssets { let image = RSImage(named: "markAllAsRead") return image! }() + + static var markBelowAsReadImage: RSImage = { + let image = RSImage(named: "markBelowAsRead") + return image! + }() + + static var markAboveAsReadImage: RSImage = { + let image = RSImage(named: "markAboveAsRead") + return image! + }() static var nextUnreadImage: RSImage = { diff --git a/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift b/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift index 32ce32ac0..843a32f79 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController+ContextualMenus.swift @@ -241,11 +241,11 @@ private extension TimelineViewController { } func markAboveReadMenuItem(_ articles: [Article]) -> NSMenuItem { - return menuItem(NSLocalizedString("Mark Above as Read", comment: "Command"), #selector(markAboveArticlesReadFromContextualMenu(_:)), articles, image: nil) + return menuItem(NSLocalizedString("Mark Above as Read", comment: "Command"), #selector(markAboveArticlesReadFromContextualMenu(_:)), articles, image: AppAssets.markAboveAsReadImage) } func markBelowReadMenuItem(_ articles: [Article]) -> NSMenuItem { - return menuItem(NSLocalizedString("Mark Below as Read", comment: "Command"), #selector(markBelowArticlesReadFromContextualMenu(_:)), articles, image: nil) + return menuItem(NSLocalizedString("Mark Below as Read", comment: "Command"), #selector(markBelowArticlesReadFromContextualMenu(_:)), articles, image: AppAssets.markBelowAsReadImage) } func selectFeedInSidebarMenuItem(_ feed: WebFeed) -> NSMenuItem { diff --git a/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json new file mode 100644 index 000000000..a564ef15f --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "markAsReadAbove.svg", + "idiom" : "universal" + } + ] +} diff --git a/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg new file mode 100644 index 000000000..33ae08783 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markAboveAsRead.symbolset/markAsReadAbove.svg @@ -0,0 +1,159 @@ + + + markAsReadAbove + + + + + + + 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 width of the blue rectangles. + + + 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.1.0 + + + Generated from circle + + + Typeset at 100 points + + + Small + + + Medium + + + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json new file mode 100644 index 000000000..2a23fbc06 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/Contents.json @@ -0,0 +1,12 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + }, + "symbols" : [ + { + "filename" : "markBelowAsRead.svg", + "idiom" : "universal" + } + ] +} diff --git a/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg new file mode 100644 index 000000000..6edb2d188 --- /dev/null +++ b/Mac/Resources/Assets.xcassets/markBelowAsRead.symbolset/markBelowAsRead.svg @@ -0,0 +1,159 @@ + + + markBelowAsRead + + + + + + + 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 width of the blue rectangles. + + + 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.1.0 + + + Generated from circle + + + Typeset at 100 points + + + Small + + + Medium + + + Large + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file