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
12 changes: 0 additions & 12 deletions DashWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
215F9BB0CAADF4D47D95C444 /* DWAvatarUploadClientTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5E2D975669CB53883D56803 /* DWAvatarUploadClientTests.swift */; };
2284B63F1C7BD28F0012ECDF /* BRAWKeypad.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F45A0A1C30EAB700B07A15 /* BRAWKeypad.swift */; };
22B03841025A55A573432CC9 /* WalletAccountsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 285B961142AB3AFF2442F4EB /* WalletAccountsScreen.swift */; };
22E89B6C00B546D294D7F331 /* SelfSizingSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CB7E093E994D2391D36DEC /* SelfSizingSheet.swift */; };
2556F3C5C72D70A771C6C61A /* PaymentProtocolWireFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = E66B030D4B574621DA2C5816 /* PaymentProtocolWireFormat.swift */; };
25C88271468A4CD23F34A6E9 /* SendScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D1F21A7592E99814A800518 /* SendScreen.swift */; };
279C16F9AF0575C540E312E5 /* SwapConvertCardRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = D99130732DE8F2E95F635F6B /* SwapConvertCardRow.swift */; };
Expand Down Expand Up @@ -341,7 +340,6 @@
3705C73F15BCD91AF70940B9 /* PlatformCreditsFormatter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 43C830DD6D63115525925F75 /* PlatformCreditsFormatter.swift */; };
371ADBAC635CEB63CA0A4A1E /* SwiftDashSDKWalletRuntime.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E9C4B39B015CD9D8AD4741D /* SwiftDashSDKWalletRuntime.swift */; };
FBA8AC3BF5464D0E85240A56 /* WalletLifecycleTransitionState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81F0D6EBA27F471A9FC46E49 /* WalletLifecycleTransitionState.swift */; };
39DC037E9CF04CCFA3EFBB53 /* SelfSizingSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96CB7E093E994D2391D36DEC /* SelfSizingSheet.swift */; };
3A377045AA5C10F3FD63A7C2 /* DWContestedNameStatusService.swift in Sources */ = {isa = PBXBuildFile; fileRef = E950113F9E258B2F1CC0D50C /* DWContestedNameStatusService.swift */; };
3A958F915CDACC6FE30923BA /* DarkCoinMessageFraming.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C25F44380CDB841AF55D3FF /* DarkCoinMessageFraming.swift */; };
3B1ECCE5521BAB084D74B5ED /* StorageModelListViews.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60A762BDA473947F1A7EF199 /* StorageModelListViews.swift */; };
Expand Down Expand Up @@ -902,8 +900,6 @@
75EBAA0D2BB9792F004488E3 /* FeatureTopText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA0B2BB9792F004488E3 /* FeatureTopText.swift */; };
75EBAA0F2BB99036004488E3 /* TextIntro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA0E2BB99036004488E3 /* TextIntro.swift */; };
75EBAA102BB99036004488E3 /* TextIntro.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA0E2BB99036004488E3 /* TextIntro.swift */; };
75EBAA122BB99B6B004488E3 /* BottomSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA112BB99B6B004488E3 /* BottomSheet.swift */; };
75EBAA132BB99B6B004488E3 /* BottomSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA112BB99B6B004488E3 /* BottomSheet.swift */; };
75EBAA1D2BBA71D9004488E3 /* ZenLedgerInfoSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EBAA1C2BBA71D9004488E3 /* ZenLedgerInfoSheet.swift */; };
75EBAA222BBA9D3C004488E3 /* ZenLedger-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 75EBAA212BBA9D3C004488E3 /* ZenLedger-Info.plist */; };
75EBAA232BBA9D3C004488E3 /* ZenLedger-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 75EBAA212BBA9D3C004488E3 /* ZenLedger-Info.plist */; };
Expand Down Expand Up @@ -3026,7 +3022,6 @@
75EBAA082BB9791B004488E3 /* Icon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Icon.swift; sourceTree = "<group>"; };
75EBAA0B2BB9792F004488E3 /* FeatureTopText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeatureTopText.swift; sourceTree = "<group>"; };
75EBAA0E2BB99036004488E3 /* TextIntro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextIntro.swift; sourceTree = "<group>"; };
75EBAA112BB99B6B004488E3 /* BottomSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BottomSheet.swift; sourceTree = "<group>"; };
75EBAA1C2BBA71D9004488E3 /* ZenLedgerInfoSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZenLedgerInfoSheet.swift; sourceTree = "<group>"; };
75EBAA212BBA9D3C004488E3 /* ZenLedger-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ZenLedger-Info.plist"; sourceTree = "<group>"; };
75EBAA242BBA9DC2004488E3 /* ZenLedger.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZenLedger.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3064,7 +3059,6 @@
8E6FAA6524ACE5F315B57AC3 /* SendViewModel.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SendViewModel.swift; sourceTree = "<group>"; };
91F0B8B82F3FAB7C00E713AE /* KeysOverviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeysOverviewView.swift; sourceTree = "<group>"; };
94606903417F75BE99D4B31C /* BIP70Error.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BIP70Error.swift; sourceTree = "<group>"; };
96CB7E093E994D2391D36DEC /* SelfSizingSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SelfSizingSheet.swift; sourceTree = "<group>"; };
97AA6C01B7CED63D37D3652B /* JoinDashPayReadinessScreen.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = JoinDashPayReadinessScreen.swift; sourceTree = "<group>"; };
97E3D9AE002847AABFDA5537 /* Pods-TodayExtension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TodayExtension.release.xcconfig"; path = "Target Support Files/Pods-TodayExtension/Pods-TodayExtension.release.xcconfig"; sourceTree = "<group>"; };
9A461F75E1E170FFE3294337 /* DWAvatarUploadClient.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DWAvatarUploadClient.swift; path = Networking/DWAvatarUploadClient.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -6922,8 +6916,6 @@
51DFA7F72FA8A9DF001EDB3A /* DashStepper.swift */,
516983C02FCAEDD600BA91A2 /* Icons */,
7581B19C2CE3509A00714007 /* Dialogs */,
75EBAA112BB99B6B004488E3 /* BottomSheet.swift */,
96CB7E093E994D2391D36DEC /* SelfSizingSheet.swift */,
AD6615F1246B5935365B05BD /* NavigationBar.swift */,
5E1C0A0100000000000000F1 /* MerchantLogoPlaceholder.swift */,
759ADD562BF3447400767ACD /* Button.swift */,
Expand Down Expand Up @@ -10058,8 +10050,6 @@
472CEE012924AA6D00656B48 /* PointOfUseListEmptyResultsView.swift in Sources */,
2A6300452328D07500827825 /* DWLockPinInputView.m in Sources */,
2A0C69AC23125074001B8C90 /* UIView+DWHUD.m in Sources */,
75EBAA122BB99B6B004488E3 /* BottomSheet.swift in Sources */,
22E89B6C00B546D294D7F331 /* SelfSizingSheet.swift in Sources */,
B453B34B871E4125607DACDC /* NavigationBar.swift in Sources */,
5E1C0A0100000000000000F2 /* MerchantLogoPlaceholder.swift in Sources */,
75CED09E2ACFD0ED0095F10C /* CoinbaseDepositRequest.swift in Sources */,
Expand Down Expand Up @@ -10592,8 +10582,6 @@
75FFD6C22BF493A60032879E /* HomeViewController+SecureWalletDelegateImpl.swift in Sources */,
C9D2C7062A320AA000D15901 /* DWOnboardingModel.m in Sources */,
C9D2C7072A320AA000D15901 /* AmountInputTypeSwitcher.swift in Sources */,
75EBAA132BB99B6B004488E3 /* BottomSheet.swift in Sources */,
39DC037E9CF04CCFA3EFBB53 /* SelfSizingSheet.swift in Sources */,
EE5F3D5C458E92B69D14BFD8 /* NavigationBar.swift in Sources */,
5E1C0A0100000000000000F3 /* MerchantLogoPlaceholder.swift in Sources */,
C9D2C7082A320AA000D15901 /* DWPlaceholderFormCellModel.m in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct TransferAmountView<ViewModel: TransferAmountViewModelProtocol>: View {
}
}
.sheet(isPresented: $showLocalCurrency) {
let dialog = BottomSheet(showBackButton: Binding<Bool>.constant(false)) {
let dialog = DashUIKit.BottomSheet(showBackButton: Binding<Bool>.constant(false)) {
LocalCurrencyView { code in
viewModel.selectFiatCurrency(code)
showLocalCurrency = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ struct CrowdNodeBalanceReminderSheet: View {
.ignoresSafeArea()
.sheet(isPresented: .constant(true)) {
// Use the lib's qualified factory: it sets `fillsHeight: false`, self-sizes to content,
// and (via `cornerRadius`) fills the sheet background + rounds the corners. Being fully
// qualified by type, it also avoids the ambiguity with the project's `selfSizingSheet`.
// and (via `cornerRadius`) fills the sheet background + rounds the corners.
// `fallback` avoids the `.medium` flash before the first measurement.
DashUIKit.BottomSheet.selfSizing(
showBackButton: .constant(false),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//

import SwiftUI
import DashUIKit

public struct JoinDashPayInfoDialog: View {
@Environment(\.presentationMode) private var presentationMode
Expand All @@ -25,7 +26,7 @@ public struct JoinDashPayInfoDialog: View {
var onClaimInvitation: (() -> Void)? = nil

public var body: some View {
BottomSheet(showBackButton: Binding<Bool>.constant(false)) {
DashUIKit.BottomSheet(showBackButton: Binding<Bool>.constant(false)) {
JoinDashPayScreen(
action: {
presentationMode.wrappedValue.dismiss()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
//

import SwiftUI
import DashUIKit

public struct MerchantTypesDialog: View {
@Environment(\.presentationMode) private var presentationMode
var action: (() -> Void)? = nil

public var body: some View {
BottomSheet(showBackButton: .constant(false)) {
DashUIKit.BottomSheet(showBackButton: .constant(false)) {
TextIntro(
icon: .custom("image.merchant"),
buttonLabel: NSLocalizedString("Ok", comment: ""),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,9 @@ struct DashSpendConfirmationDialog: View {
.padding(.horizontal, 20)
.padding(.bottom, 20)
}
// Publish the natural height so `.selfSizingSheet()` (which reads
// `BottomSheetHeightPreferenceKey`) can size the sheet. This dialog is not a `BottomSheet`,
// so without this the modifier never gets a measurement and falls back to `.medium`, which
// is too short and lets the content overflow above the sheet. `.fixedSize(vertical:)` keeps
// the measurement stable (decoupled from the offered height) like the BottomSheet does.
// Keep the natural height independent of the offered detent so DashUIKit's
// `.selfSizingSheet()` can measure a stable intrinsic height.
.fixedSize(horizontal: false, vertical: true)
.background(
GeometryReader { proxy in
Color.clear.preference(
key: BottomSheetHeightPreferenceKey.self,
value: proxy.size.height
)
}
)
}

private func detailsRow(title: String, @ViewBuilder value: () -> some View) -> some View {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//

import SwiftUI
import DashUIKit

struct DashSpendLoginInfoView: View {
let provider: GiftCardProvider
Expand All @@ -25,7 +26,7 @@ struct DashSpendLoginInfoView: View {
@State private var inProgress: Bool = false

var body: some View {
BottomSheet(showBackButton: .constant(false)) {
DashUIKit.BottomSheet(showBackButton: .constant(false)) {
VStack {
TextIntro(
icon: .custom(provider.logoName, maxHeight: 60),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ extension HomeViewController: DWLocalCurrencyViewControllerDelegate {

private func shortcutSelectionSheetView(for position: Int) -> AnyView {
let usedTypes = Set(HomeViewModel.shared.shortcutItems.map { $0.type })
let sheet = BottomSheet(title: NSLocalizedString("Select option", comment: ""),
let sheet = DashUIKit.BottomSheet(title: NSLocalizedString("Select option", comment: ""),
showBackButton: .constant(false)) {
ShortcutSelectionView(usedTypes: usedTypes) { [weak self] selectedType in
self?.applyShortcutCustomization(type: selectedType, at: position)
Expand Down
4 changes: 2 additions & 2 deletions DashWallet/Sources/UI/Home/Views/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ struct GiftCardDetailsSheet: View {

var body: some View {
let showsTxDetailRoute = txDetailRoute != nil
let dialog = BottomSheet(
let dialog = DashUIKit.BottomSheet(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Flagging here as representative of all ~15 migrated sheets: the grabber changes colour app-wide.

The deleted local BottomSheet drew it with Color.dash.gray300Alpha50#B0B5BD at 50% alpha, with no dark-mode variant. DashUIKit.BottomSheet uses Color.dash.grabberFill#B0B6BC at 100% alpha in light mode, white at 30% in dark.

So in light mode the grabber becomes twice as opaque on every bottom sheet in the app, and dark mode gains a variant it didn't have. This looks intentional (it aligns everything with DashSpendConfirmationDialog, which already used grabberFill), but the PR body says "Breaking Changes: None" and "preserved each migrated caller's existing … behavior", and there is no UI CI here — only Validate PR title and CodeRabbit ran. Two sheets are screenshotted; the change lands on all of them. Worth naming in the description and confirming with design.

showBackButton: $showBackButton,
onBackButtonPressed: {
handleBackNavigation()
Expand Down Expand Up @@ -1066,7 +1066,7 @@ struct TransactionDetailsSheet: View {
var item: TransactionListDataItem

var body: some View {
BottomSheet(showBackButton: $showBackButton, onBackButtonPressed: {
DashUIKit.BottomSheet(showBackButton: $showBackButton, onBackButtonPressed: {
backNavigationRequested = true
}) {
TxDetailsDestination(from: item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ struct ShortcutSelectionView: View {
VStack {
Color.dash.secondaryBackground.ignoresSafeArea()
.sheet(isPresented: .constant(true)) {
let sheet = BottomSheet(title: NSLocalizedString("Select option", comment: ""), showBackButton: .constant(false)) {
let sheet = DashUIKit.BottomSheet(title: NSLocalizedString("Select option", comment: ""), showBackButton: .constant(false)) {
ShortcutSelectionView(usedTypes: [.receive, .send, .spend]) { _ in }
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct WalletSwitchDialog: View {
}

var body: some View {
BottomSheet(
DashUIKit.BottomSheet(
title: NSLocalizedString("Switch Wallet", comment: "Wallets"),
showBackButton: .constant(false)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct TransactionFilterDialog: View {
}

var body: some View {
BottomSheet(
DashUIKit.BottomSheet(
title: NSLocalizedString("Filter transactions", comment: ""),
showBackButton: .constant(false)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ struct BuyEnterAmountView: View {
}
.dexOfflineToast(isOnline: viewModel.isOnline)
.sheet(isPresented: $showLocalCurrency) {
let dialog = BottomSheet(
let dialog = DashUIKit.BottomSheet(
showBackButton: Binding<Bool>.constant(false)
) {
LocalCurrencyView { code in
Expand Down
2 changes: 1 addition & 1 deletion DashWallet/Sources/UI/Swap/Convert/SwapConvertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct SwapConvertView: View {
}
.dexOfflineToast(isOnline: viewModel.isOnline)
.sheet(isPresented: $showLocalCurrency) {
let dialog = BottomSheet(
let dialog = DashUIKit.BottomSheet(
showBackButton: Binding<Bool>.constant(false)
) {
LocalCurrencyView { code in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ struct OrderPreviewFeeRow: View {
.padding(.vertical, rowVPadding)
.frame(minHeight: rowMinHeight)
.sheet(isPresented: $showInfoSheet) {
BottomSheet(showBackButton: .constant(false), fillsHeight: false) {
DashUIKit.BottomSheet(showBackButton: .constant(false), fillsHeight: false) {
SwapFeeInfoSheet(
usesGenericFeeInfo: usesGenericFeeInfo,
onDismiss: { showInfoSheet = false }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ private struct SwapFeeInfoSheetPreviewHost: View {
Color.dash.primaryBackground
.ignoresSafeArea()
.sheet(isPresented: $isPresented) {
// let sheet = BottomSheet(showBackButton: .constant(false)) {
// let sheet = DashUIKit.BottomSheet(showBackButton: .constant(false)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: this eight-line commented-out block was updated to the new name rather than deleted. Keeping dead code in sync with live code is pure carrying cost — it should go.

// SwapFeeInfoSheet(onDismiss: {})
// }
//
Expand All @@ -109,7 +109,7 @@ private struct SwapFeeInfoSheetPreviewHost: View {
// sheet
// }

BottomSheet(showBackButton: .constant(false), fillsHeight: false) {
DashUIKit.BottomSheet(showBackButton: .constant(false), fillsHeight: false) {
SwapFeeInfoSheet(usesGenericFeeInfo: false, onDismiss: {})
}
.selfSizingSheet()
Expand Down
Loading
Loading