Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
262 changes: 143 additions & 119 deletions DashWallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,26 +50,6 @@
ReferencedContainer = "container:DashWallet.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "31D68B4F1C23B6C10030FAAA"
BuildableName = "DashWalletUITests.xctest"
BlueprintName = "DashWalletUITests"
ReferencedContainer = "container:DashWallet.xcodeproj">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2A4662FF2279DC2F0027533B"
BuildableName = "DashWalletScreenshotsUITests.xctest"
BlueprintName = "DashWalletScreenshotsUITests"
ReferencedContainer = "container:DashWallet.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
18 changes: 9 additions & 9 deletions DashWallet.xcworkspace/xcshareddata/swiftpm/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"images" : [
{
"filename" : "dashconnect-empty.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dashconnect-empty@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dashconnect-empty@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"images" : [
{ "filename" : "icon.svg", "idiom" : "universal" }
],
"info" : { "author" : "xcode", "version" : 1 },
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"images" : [
{ "filename" : "icon.svg", "idiom" : "universal" }
],
"info" : { "author" : "xcode", "version" : 1 },
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"images" : [
{ "filename" : "icon.svg", "idiom" : "universal" }
],
"info" : { "author" : "xcode", "version" : 1 },
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
Comment on lines +6 to +9

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use template rendering for generic SVG UI icons.

Both assets use "original" despite being generic UI glyphs. This prevents the consuming UI from applying its tint.

  • DashWallet/Resources/AppAssets.xcassets/DashConnect/dashconnect.xmark.circle.imageset/Contents.json#L6-L9: set "template-rendering-intent" to "template".
  • DashWallet/Resources/AppAssets.xcassets/DashConnect/menu.connections.imageset/Contents.json#L6-L9: set "template-rendering-intent" to "template".

As per coding guidelines, “use the correct template or original rendering intent for the consuming UI.” Based on learnings, generic SVG UI icons must use template.

📍 Affects 2 files
  • DashWallet/Resources/AppAssets.xcassets/DashConnect/dashconnect.xmark.circle.imageset/Contents.json#L6-L9 (this comment)
  • DashWallet/Resources/AppAssets.xcassets/DashConnect/menu.connections.imageset/Contents.json#L6-L9
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@DashWallet/Resources/AppAssets.xcassets/DashConnect/dashconnect.xmark.circle.imageset/Contents.json`
around lines 6 - 9, Update the template-rendering-intent property to "template"
in
DashWallet/Resources/AppAssets.xcassets/DashConnect/dashconnect.xmark.circle.imageset/Contents.json
lines 6-9 and
DashWallet/Resources/AppAssets.xcassets/DashConnect/menu.connections.imageset/Contents.json
lines 6-9, preserving the existing vector representation settings.

Sources: Coding guidelines, Learnings

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "menu-connections.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "menu-connections@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "menu-connections@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Comment on lines +2 to +17

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Replace the raster menu glyph with an SVG asset.

This new generic icon uses PNG files at three scales. Use a local SVG with "preserves-vector-representation": true and template rendering instead. This preserves sharp rendering at all display scales and permits menu tinting.

As per coding guidelines, “Prefer SVG over PNG for new icons, preserve vector representation, and use the correct template or original rendering intent for the consuming UI.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@DashWallet/Resources/AppAssets.xcassets/DashConnect/menu-connections.imageset/Contents.json`
around lines 2 - 17, The menu-connections asset catalog entry should use a
single local SVG instead of the three PNG scale variants. Update the imageset
Contents.json to reference the SVG, enable preserves-vector-representation, and
configure template rendering so the consuming menu can apply tinting.

Source: Coding guidelines

],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"images" : [
{ "filename" : "icon.svg", "idiom" : "universal" }
],
"info" : { "author" : "xcode", "version" : 1 },
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "original"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,15 @@ final class NetworkReachability: NSObject {
hasReceivedFirstPath = false
lock.unlock()

// Block until the first path update lands so callers observe real
// state the moment this method returns — matches `SCNetworkReachability`'s
// synchronous contract that `DSReachabilityManager` relied on.
let firstUpdate = DispatchSemaphore(value: 0)
m.pathUpdateHandler = { [weak self] path in
if self?.handlePathUpdate(path) == true {
firstUpdate.signal()
}
self?.handlePathUpdate(path)
}
m.start(queue: queue)
_ = firstUpdate.wait(timeout: .now() + .milliseconds(200))

// Callers read `isReachable` the moment this returns, so the state is
// seeded from the path the monitor already holds instead of parking the
// caller until the utility-QoS queue delivers its first callback.
handlePathUpdate(m.currentPath)
}

@objc func stopMonitoring() {
Expand All @@ -80,16 +78,15 @@ final class NetworkReachability: NSObject {
m?.cancel()
}

/// Returns `true` on the first path update after `startMonitoring()`.
@discardableResult
private func handlePathUpdate(_ path: NWPath) -> Bool {
/// Updates the shared reachability snapshot from the latest path and marks
/// whether the monitor has observed at least one path since it started.
private func handlePathUpdate(_ path: NWPath) {
let reachable = path.status == .satisfied
let wifi = reachable && path.usesInterfaceType(.wifi)

lock.lock()
_isReachable = reachable
_isReachableViaWiFi = wifi
let wasFirst = !hasReceivedFirstPath
hasReceivedFirstPath = true
lock.unlock()

Expand All @@ -99,6 +96,5 @@ final class NetworkReachability: NSObject {
object: self
)
}
return wasFirst
}
}
Loading
Loading