Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/dapps fixes #1319

Merged
merged 26 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
78729c5
ModalCard Presentation Factory implemented
svojsu Dec 24, 2024
82c7044
Merge branch 'feature/custom-modal-presentation' into fix/card-modal-…
svojsu Dec 24, 2024
a8942f9
bugfixes
svojsu Dec 27, 2024
e26233a
fix hiding bars after orientation changes
svojsu Dec 27, 2024
892a76d
clean view hierarchy on widget close
svojsu Dec 27, 2024
f70cf4d
show and hide categories
svojsu Dec 27, 2024
dbf46a1
progress
svojsu Dec 27, 2024
a743b02
fix close browser widget
svojsu Dec 27, 2024
00470d1
introduce new card modal transition with ModalCardPresentationFactory
svojsu Dec 30, 2024
dba4f22
update modals layout on browser widget close
svojsu Dec 30, 2024
64c5882
remove delegates references
svojsu Jan 2, 2025
6f99f7e
fix important flow navigation presented in card
svojsu Jan 2, 2025
f34702f
various fixes
svojsu Jan 3, 2025
c6468d7
editable table case processing
svojsu Jan 3, 2025
b1d4d45
Merge branch 'fix/card-modal-presentation' into fix/dapps-fixes
svojsu Jan 3, 2025
d636f01
Merge branch 'develop' into fix/dapps-fixes
svojsu Jan 3, 2025
08e6436
merge fixes
svojsu Jan 3, 2025
cd08ca3
Merge branch 'feature/custom-modal-presentation' into fix/dapps-fixes
svojsu Jan 3, 2025
cf67f05
fix header button for dapp list collection
svojsu Jan 3, 2025
954b0a2
fix cells moving in modal card presentation
svojsu Jan 3, 2025
2ff3b51
review fixes
svojsu Jan 6, 2025
76fe3ab
Disable interactive dismiss for for dapp confirmation and swap execut…
svojsu Jan 6, 2025
57818bb
Merge branch 'feature/custom-modal-presentation' into fix/dapps-fixes
svojsu Jan 6, 2025
f8c4aa9
clip top container views
svojsu Jan 7, 2025
0ff97bd
fix your wallets presentable
ERussel Jan 7, 2025
1bd54d4
Merge pull request #1325 from novasamatech/research/modal-presentatio…
svojsu Jan 7, 2025
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
75 changes: 35 additions & 40 deletions novawallet.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ import UIKit

extension UIApplication {
var tabBarController: MainTabBarViewController? {
delegate?
.window??
.rootViewController?
rootContainer?
.children
.first(where: { $0 is UITabBarController }) as? MainTabBarViewController
}

var rootContainer: NovaMainAppContainerViewController? {
delegate?
.window??
.rootViewController as? NovaMainAppContainerViewController
}
}
62 changes: 62 additions & 0 deletions novawallet/Common/Extension/UIKit/UIScreen+Corners.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import UIKit

extension UIScreen {
var cornerRadius: CGFloat {
let identifier = deviceModelIdentifier()

switch identifier {
case "iPhone10,3", "iPhone10,6",
"iPhone11,2",
"iPhone11,4", "iPhone11,6",
"iPhone12,3",
"iPhone12,5":
return 39.0

case "iPhone11,8",
"iPhone12,1":
return 41.5

case "iPhone13,1",
"iPhone14,4":
return 44.0

case "iPhone13,2",
"iPhone13,3",
"iPhone14,2",
"iPhone14,7":
return 47.33

case "iPhone13,4",
"iPhone14,3",
"iPhone14,8":
return 53.33

case "iPhone15,2",
"iPhone15,3",
"iPhone15,4",
"iPhone15,5",
"iPhone16,1",
"iPhone16,2",
"iPhone17,3",
"iPhone17,4":
return 55.0

case "iPhone17,1",
"iPhone17,2":
return 62.0
default:
return 0
}
}

private func deviceModelIdentifier() -> String {
var systemInfo = utsname()
uname(&systemInfo)
let machineMirror = Mirror(reflecting: systemInfo.machine)
let identifier = machineMirror.children.reduce("") { identifier, element in
guard let value = element.value as? Int8, value != 0 else { return identifier }
return identifier + String(UnicodeScalar(UInt8(value)))
}
return identifier
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ final class TransactionSigningPresenter: TransactionSigningPresenting {
completion(.failure(HardwareSigningError.signingCancelled))
}

controller.present(navigationController, animated: true)
controller.presentWithCardLayout(navigationController, animated: true)
}

func presentParitySignerFlow(
Expand Down
6 changes: 3 additions & 3 deletions novawallet/Common/Protocols/YourWalletsPresentable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ protocol YourWalletsPresentable {
address: AccountAddress?,
delegate: YourWalletsDelegate
)
func hideYourWallets(from view: ControllerBackedProtocol?)
func hideYourWallets(from view: YourWalletsPresentationProtocol)
}

extension YourWalletsPresentable {
Expand All @@ -32,7 +32,7 @@ extension YourWalletsPresentable {
view?.controller.present(viewController.controller, animated: true)
}

func hideYourWallets(from view: ControllerBackedProtocol?) {
view?.controller.dismiss(animated: true)
func hideYourWallets(from view: YourWalletsPresentationProtocol) {
view.controller.dismiss(animated: true)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ final class TitleCollectionHeaderView: UICollectionReusableView {
}
}

var buttonWidth: CGFloat = 40.0 {
didSet {
button.snp.updateConstraints { make in
make.width.greaterThanOrEqualTo(buttonWidth)
}
}
}

override init(frame: CGRect) {
super.init(frame: frame)

Expand All @@ -69,13 +77,15 @@ final class TitleCollectionHeaderView: UICollectionReusableView {

displayContentView.addSubview(button)
button.snp.makeConstraints { make in
make.centerY.trailing.equalToSuperview()
make.top.bottom.equalToSuperview()
make.trailing.equalToSuperview()
make.width.greaterThanOrEqualTo(buttonWidth)
}

displayContentView.addSubview(titleView)
titleView.snp.makeConstraints { make in
make.leading.centerY.equalToSuperview()
make.trailing.equalTo(button.snp.leading)
make.trailing.lessThanOrEqualTo(button.snp.leading).offset(-8)
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading