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

feat: MyKSuite UI #1409

Merged
merged 55 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
5b43b71
feat: Present a sample SwiftUI View
adrien-coye Jan 27, 2025
4f6d504
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 29, 2025
3772618
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 29, 2025
cca8830
feat: Force ios-core-ui to mykSuite branch
adrien-coye Jan 29, 2025
a3ca534
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 29, 2025
ebb5603
feat: Tuist project setup with external feature module
adrien-coye Jan 29, 2025
2babd08
chore: Bump coreUI
adrien-coye Jan 30, 2025
3063fb7
feat(MyKSuiteFloatingPanelBridgeController): Display SwiftUI code in …
adrien-coye Jan 30, 2025
2c29d90
feat(MyKSuiteFloatingPanelBridgeController): Adjusted margins
adrien-coye Jan 30, 2025
6561e98
feat(MyKSuiteFloatingPanelBridgeController): New kDrive dedicated assets
adrien-coye Jan 30, 2025
9f8af8d
feat(Drive): Quota is now non nullable as discussed with backend
adrien-coye Jan 30, 2025
42a46bc
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 30, 2025
4144c18
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 30, 2025
6daff3a
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 30, 2025
0932d47
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 31, 2025
15a2dd0
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Jan 31, 2025
d5ee873
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 3, 2025
2547686
feat: Bump UI with latest API
adrien-coye Feb 3, 2025
9d34354
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 4, 2025
77a0d17
feat(AppRouter): New explicit method presentUpSaleSheet
adrien-coye Feb 4, 2025
11799eb
chore(MyKSuiteFloatingPanelBridgeController): Clean code
adrien-coye Feb 4, 2025
d1ee013
fix(AppRouter): Animate presentUpSaleSheet method
adrien-coye Feb 5, 2025
53d7cfc
fix(AppRouter): Animate MyKSuiteFloatingPanelBridgeController prensen…
adrien-coye Feb 5, 2025
69bae35
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 6, 2025
7b39dcf
chore: Switched to ios-features
adrien-coye Feb 6, 2025
02ec6bb
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 6, 2025
a560aca
fix(MCKRouter): Updated test mock
adrien-coye Feb 6, 2025
76d2791
fix(ios-features): Allow the project to build again with the new link…
adrien-coye Feb 6, 2025
7afee67
chore(AppRouter): Removed iOS 15 conditional code
adrien-coye Feb 6, 2025
6ae2438
chore(MyKSuiteFloatingPanelBridgeController): Removed iOS 15 conditio…
adrien-coye Feb 6, 2025
498fca3
fix(Package.swift): Added InfomaniakDI as a Framework to guarantee on…
adrien-coye Feb 6, 2025
03a4d6a
feat: Trying to bridge a SwUI view in a scrollview in a presented sheet
adrien-coye Feb 7, 2025
b6008f0
feat(MyKSuiteBridgeViewController): Modern sheet presentation
adrien-coye Feb 7, 2025
5362879
feat(presentUpSaleSheet): Animate a dismiss before presenting
adrien-coye Feb 7, 2025
261b83e
chore: Upgrade tuist + Explicitly declare dependencies
PhilippeWeidmann Feb 7, 2025
09159f2
fix: Remove target grouping
PhilippeWeidmann Feb 7, 2025
e08582c
test: Shared Env
PhilippeWeidmann Feb 7, 2025
71d403b
fix: Lottie needs to be dynamic
PhilippeWeidmann Feb 7, 2025
b5e177c
test: Remove old test + Stop testing DriveFileManager
PhilippeWeidmann Feb 7, 2025
4072f0e
test: Update some old tests
PhilippeWeidmann Feb 7, 2025
c9cb451
feat(ios-features): Added necessary libraries as a Framework
adrien-coye Feb 7, 2025
951b6ae
chore: Bump core
PhilippeWeidmann Feb 7, 2025
901a587
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 10, 2025
decb0a0
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 10, 2025
f258287
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 11, 2025
535ea70
feat(ios-features): Bump to 1.0.0
adrien-coye Feb 11, 2025
7518412
chore: Tuist update
adrien-coye Feb 11, 2025
2e9fd93
feat: MykSuite chip (#1421)
adrien-coye Feb 12, 2025
4fbe8a8
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 13, 2025
3ec7a65
Merge branch 'converstion-quota-dropbox' into converstion-quota-dropb…
adrien-coye Feb 13, 2025
408d109
feat: Dropbox quota (#1432)
adrien-coye Feb 13, 2025
e7da516
chore(router): Removed .askToUpSaleIfQuotaReached method
adrien-coye Feb 13, 2025
6aac4cf
feat: Public share quota, advanced settings chip (#1430)
adrien-coye Feb 14, 2025
5fd647b
feat: MykSuite dashboard (#1419)
adrien-coye Feb 14, 2025
80673d3
refactor(MyKSuiteFloatingPanelBridgeController): Instantiate pattern
adrien-coye Feb 14, 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
1 change: 1 addition & 0 deletions Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ let project = Project(name: "kDrive",
.external(name: "MarkdownKit"),
.external(name: "RealmSwift"),
.external(name: "Realm"),
.external(name: "MyKSuite"),
.sdk(name: "StoreKit", type: .framework, status: .required)
],
settings: .settings(base: Constants.baseSettings),
Expand Down
31 changes: 20 additions & 11 deletions Tuist/Package.resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "978577225a5036d45e6d0b6efa3114b62d416e56115615c78b83bb375e8534df",
"originHash" : "8861f96269cb0948c6a4f36939cb053cc533985c8abc8a6cd517110b6da6bc0f",
"pins" : [
{
"identity" : "alamofire",
Expand Down Expand Up @@ -96,8 +96,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-core-ui",
"state" : {
"revision" : "3c36b8c376dd8779b47a5b03acfbe71ed270282a",
"version" : "18.0.0"
"revision" : "4d988c5e91d27db9ea3905242cb6c3a44df472d0",
"version" : "18.1.0"
}
},
{
Expand All @@ -109,6 +109,15 @@
"version" : "2.0.3"
}
},
{
"identity" : "ios-features",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Infomaniak/ios-features",
"state" : {
"revision" : "c1b1a15d0fd6bf4622dc6f0d675e795b60c952f1",
"version" : "1.0.3"
}
},
{
"identity" : "ios-login",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -231,8 +240,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/getsentry/sentry-cocoa",
"state" : {
"revision" : "f45e9c62d7a4d9258ac3cf35a3acf9dbab4481d1",
"version" : "8.43.0"
"revision" : "0c34e4da899a1dd9183db04082d1ceb6e9c2b301",
"version" : "8.44.0"
}
},
{
Expand All @@ -258,8 +267,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-algorithms",
"state" : {
"revision" : "f6919dfc309e7f1b56224378b11e28bab5bccc42",
"version" : "1.2.0"
"revision" : "87e50f483c54e6efd60e885f7f5aa946cee68023",
"version" : "1.2.1"
}
},
{
Expand Down Expand Up @@ -303,17 +312,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio.git",
"state" : {
"revision" : "dff45738d84a53dbc8ee899c306b3a7227f54f89",
"version" : "2.80.0"
"revision" : "c51907a839e63ebf0ba2076bba73dd96436bd1b9",
"version" : "2.81.0"
}
},
{
"identity" : "swift-nio-transport-services",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-nio-transport-services.git",
"state" : {
"revision" : "bbd5e63cf949b7db0c9edaf7a21e141c52afe214",
"version" : "1.23.0"
"revision" : "3c394067c08d1225ba8442e9cffb520ded417b64",
"version" : "1.23.1"
}
},
{
Expand Down
8 changes: 6 additions & 2 deletions Tuist/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ let packageSettings = PackageSettings(
"Kingfisher": .framework,
"Lottie": .framework,
"RealmSwift": .framework,
"Realm": .framework
"Realm": .framework,
"MyKSuite": .framework,
"InfomaniakCoreSwiftUI": .framework,
"DesignSystem": .framework
]
)

Expand All @@ -31,7 +34,8 @@ let package = Package(
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMajor(from: "1.2.0")),
.package(url: "https://github.com/Alamofire/Alamofire", .upToNextMajor(from: "5.2.2")),
.package(url: "https://github.com/Infomaniak/ios-core", .upToNextMajor(from: "15.0.0")),
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "18.0.0")),
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "18.1.0")),
.package(url: "https://github.com/Infomaniak/ios-features", .upToNextMajor(from: "1.0.3")),
.package(url: "https://github.com/Infomaniak/ios-login", .upToNextMajor(from: "7.2.0")),
.package(url: "https://github.com/Infomaniak/ios-dependency-injection", .upToNextMajor(from: "2.0.3")),
.package(url: "https://github.com/Infomaniak/swift-concurrency", .upToNextMajor(from: "1.0.0")),
Expand Down
32 changes: 32 additions & 0 deletions kDrive/AppRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import InfomaniakDI
import InfomaniakLogin
import kDriveCore
import kDriveResources
import MyKSuite
import SafariServices
import SwiftUI
import UIKit
import VersionChecker

Expand Down Expand Up @@ -144,6 +146,7 @@ public struct AppRouter: AppNavigable {
restoreMainUIStackIfPossible(driveFileManager: driveFileManager, restoration: restoration)

showLaunchFloatingPanel()

Task {
await askForReview()
await askUserToRemovePicturesIfNecessary()
Expand Down Expand Up @@ -510,6 +513,35 @@ public struct AppRouter: AppNavigable {
}
}

@MainActor public func presentUpSaleSheet() {
guard let window,
let rootViewController = window.rootViewController else {
return
}

rootViewController.dismiss(animated: true) {
let viewControllerToPresent = MyKSuiteBridgeViewController.instantiate()
if let sheet = viewControllerToPresent.sheetPresentationController {
if #available(iOS 16.0, *) {
sheet.detents = [
.custom { _ in
return 560
}
]
} else {
sheet.detents = [.large()]
sheet.largestUndimmedDetentIdentifier = .large
}

sheet.prefersScrollingExpandsWhenScrolledToEdge = false
sheet.prefersEdgeAttachedInCompactHeight = true
sheet.widthFollowsPreferredContentSizeWhenEdgeAttached = true
sheet.prefersGrabberVisible = true
}
rootViewController.present(viewControllerToPresent, animated: true)
}
}

public func askForReview() async {
guard let presentingViewController = await window?.rootViewController,
!Bundle.main.isRunningInTestFlight else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"colors": [
"colors" : [
{
"color": {
"color-space": "srgb",
"components": {
"alpha": "1.000",
"blue": "0x2E",
"green": "0x47",
"red": "0xFB"
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2E",
"green" : "0x47",
"red" : "0xFB"
}
},
"idiom": "universal"
"idiom" : "universal"
}
],
"info": {
"author": "xcode",
"version": 1
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xF1",
"green" : "0xF1",
"red" : "0xF1"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x1A",
"green" : "0x1A",
"red" : "0x1A"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x72",
"green" : "0x67",
"red" : "0x55"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xFF",
"green" : "0xFF",
"red" : "0xFF"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x33",
"green" : "0x33",
"red" : "0x33"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "drive.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "folder.arrow.up.svg",
"idiom" : "universal"
}
],
"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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "myKSuitePlus.logo.svg",
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"filename" : "Logo kSuite.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Loading