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 chip #1421

Merged
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
3875276
feat(FolderTypeTableViewCell): MykSuite chip
adrien-coye Feb 4, 2025
371008a
feat(NewFolderTypeTableViewController): Present upsale sheet when needed
adrien-coye Feb 4, 2025
f652523
feat(NewFolderTypeTableViewController): Explicit present call
adrien-coye Feb 4, 2025
09252a1
refactor(FolderTypeTableViewCell): Remove comment
adrien-coye Feb 4, 2025
1bb510a
feat(ShareAndRightsViewController): Present upsale on myKSuite
adrien-coye Feb 4, 2025
6e98052
feat(ShareLinkTableViewCell): Display MykSuiteChip
adrien-coye Feb 5, 2025
8ff16c4
refactor(FolderTypeTableViewCell): Renamed to chipContainerView
adrien-coye Feb 5, 2025
31c1ae2
feat(FilesHeaderView): Display the trash header view that matches the…
adrien-coye Feb 5, 2025
840d131
feat(FilesHeaderView): Show trash header view only when needed
adrien-coye Feb 5, 2025
a9e520b
feat: Clear color for chip container view
adrien-coye Feb 5, 2025
3e425da
chore(FileListViewController): Force display chip for now
adrien-coye Feb 5, 2025
798b712
feat(MyKSuiteChip): Proper chip design with correct background color
adrien-coye Feb 5, 2025
3197e79
fix(FilesHeaderView): Correct margin for chip view
adrien-coye Feb 5, 2025
3994002
fix(FolderTypeTableViewCell): Correct chip constraint
adrien-coye Feb 5, 2025
131ac79
chore(FileListViewController): Better temporary display logic
adrien-coye Feb 5, 2025
9d4d285
feat(FilesHeaderView): Present upsale sheet on tap
adrien-coye Feb 5, 2025
772febc
feat(ShareLinkTableViewCell): Handle extra actions for mykSuite
adrien-coye Feb 5, 2025
c1c560f
feat(MyKSuiteBridgeViewController): Modern sheet presentation
adrien-coye Feb 7, 2025
34666a2
feat(presentUpSaleSheet): Animate a dismiss before presenting
adrien-coye Feb 7, 2025
78061c5
chore: Upgrade tuist + Explicitly declare dependencies
PhilippeWeidmann Feb 7, 2025
e8f42ea
fix: Remove target grouping
PhilippeWeidmann Feb 7, 2025
b286ca2
test: Shared Env
PhilippeWeidmann Feb 7, 2025
1043461
fix: Lottie needs to be dynamic
PhilippeWeidmann Feb 7, 2025
1d28da0
test: Remove old test + Stop testing DriveFileManager
PhilippeWeidmann Feb 7, 2025
07018a6
test: Update some old tests
PhilippeWeidmann Feb 7, 2025
5200585
feat(ios-features): Added necessary libraries as a Framework
adrien-coye Feb 7, 2025
f7caa27
chore: Bump core
PhilippeWeidmann Feb 7, 2025
6bb26ce
feat(FolderTypeTableViewCell): Changed space between title and subtit…
adrien-coye Feb 10, 2025
50d9a3f
feat(FilesHeaderView): Bump margin between title and subtitle to 8pt
adrien-coye Feb 10, 2025
86bfeb2
feat(myKSuitePlus.logo): Dark mode
adrien-coye Feb 10, 2025
689e496
chore: Upgrade tuist + Explicitly declare dependencies
PhilippeWeidmann Feb 7, 2025
50799ed
fix: Remove target grouping
PhilippeWeidmann Feb 7, 2025
8b1baef
test: Update some old tests
PhilippeWeidmann Feb 7, 2025
049599a
feat(ios-features): Added necessary libraries as a Framework
adrien-coye Feb 7, 2025
dfb3cca
feat(myKSuitePlus.logo): Dark mode background color
adrien-coye Feb 10, 2025
c5910e2
feat(greyBackgroundChipColor): Changed darkmode background color
adrien-coye Feb 10, 2025
72f4c25
feat(Drive+Quota): If Quota is not present we do not enforce limitati…
adrien-coye Feb 10, 2025
115bce6
feat(Drive): Method isFreePack return true when pack is myKSuite
adrien-coye Feb 11, 2025
ddf3d81
feat(LocalizedFilenameFormatter): Use drive.isFreePack for correctness
adrien-coye Feb 11, 2025
dac063a
chore: Update to latest version os i18n
adrien-coye Feb 10, 2025
599a77c
feat(FileListViewController): Correct check for trash folder
adrien-coye Feb 11, 2025
f4364c6
feat(FilesHeaderView): Translations for mykSuite trash header view
adrien-coye Feb 11, 2025
095fcb3
refactor: PR self feedback
adrien-coye Feb 11, 2025
32a4924
refactor: Chore typo
adrien-coye Feb 11, 2025
6b35c3b
feat(ShareAndRightsViewController): Removed force display chip
adrien-coye Feb 11, 2025
36e8de8
feat(ShareLinkTableViewCell): Removed force display chip
adrien-coye Feb 11, 2025
e7eada6
feat(NewFolderTypeTableViewController): Enable pack check
adrien-coye Feb 11, 2025
7b1af55
chore: Clean dead comment
adrien-coye Feb 11, 2025
f0f0d8a
feat(FileListViewController): Enable actual mykSuite logic check
adrien-coye Feb 11, 2025
86c78c7
fix: Make the branch build great again
adrien-coye Feb 11, 2025
1c23410
refactor(ShareLinkTableViewCell): Make sure the cell loads great
adrien-coye Feb 11, 2025
53592e8
chore: Update project post rebase to work on ios-features 1.0.0
adrien-coye Feb 11, 2025
ef5a28e
Merge branch 'converstion-quota-dropbox-view' into converstion-quota-…
adrien-coye Feb 11, 2025
bbcfce9
chore: Project setup
adrien-coye Feb 11, 2025
58a561e
Merge branch 'converstion-quota-dropbox-view' into converstion-quota-…
adrien-coye Feb 11, 2025
f9bd1cb
chore: Remove trash asset and substitute it for delete
adrien-coye Feb 12, 2025
2cf4338
feat(FilesHeaderView): Using TextStyle with IKLabel
adrien-coye Feb 12, 2025
7833a7c
chore: Remove duplicated color
adrien-coye Feb 12, 2025
f2ae20d
feat(FilesHeaderView): Using existing color
adrien-coye Feb 12, 2025
b904247
feat(FloatingPanelActionCollectionViewCell): Chip capability (#1429)
adrien-coye Feb 12, 2025
05931fb
feat: Rework existing limitations (#1428)
adrien-coye Feb 12, 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
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,20 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0xB6",
"green" : "0xA2",
"red" : "0x85"
}
},
"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,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
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
Expand Up @@ -108,6 +108,8 @@ class FileListViewController: UICollectionViewController, SwipeActionCollectionV
return button
}()

lazy var packId = DrivePackId(rawValue: driveFileManager.drive.pack.name)

// MARK: - View controller lifecycle

deinit {
Expand Down Expand Up @@ -590,6 +592,10 @@ class FileListViewController: UICollectionViewController, SwipeActionCollectionV
headerView.commonDocumentsDescriptionLabel.isHidden = true
}

let isTrash = viewModel.currentDirectory.id == DriveFileManager.trashRootFile.id
let isMykSuite = packId == .myKSuite
headerView.trashInformationView.isHidden = !(isTrash && isMykSuite)

headerView.sortView.isHidden = !isEmptyViewHidden

headerView.sortButton.isHidden = viewModel.configuration.sortingOptions.isEmpty
Expand Down
4 changes: 3 additions & 1 deletion kDrive/UI/Controller/Files/FileDetailViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class FileDetailViewController: UIViewController, SceneStateRestorable {
private var comments = [Comment]()
private var commentsInfo = (page: 1, hasNextPage: true, isLoading: true)

lazy var packId = DrivePackId(rawValue: driveFileManager.drive.pack.name)

private struct ActivitySection {
let referenceDate: Date
var elements: [FileActivity]
Expand Down Expand Up @@ -550,7 +552,7 @@ extension FileDetailViewController: UITableViewDelegate, UITableViewDataSource {
case .share:
let cell = tableView.dequeueReusableCell(type: ShareLinkTableViewCell.self, for: indexPath)
cell.delegate = self
cell.configureWith(file: file, insets: false)
cell.configureWith(file: file, currentPackId: packId, insets: false)
return cell
case .categories:
let cell = tableView.dequeueReusableCell(type: ManageCategoriesTableViewCell.self, for: indexPath)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import UIKit
class ShareAndRightsViewController: UIViewController {
@IBOutlet var tableView: UITableView!

@LazyInjectService var router: AppNavigable
@LazyInjectService var accountManager: AccountManageable

private enum ShareAndRightsSections: CaseIterable {
Expand All @@ -48,6 +49,8 @@ class ShareAndRightsViewController: UIViewController {
var driveFileManager: DriveFileManager!
var file: File!

lazy var packId = DrivePackId(rawValue: driveFileManager.drive.pack.name)

override func viewDidLoad() {
super.viewDidLoad()
// Documentation says it's better to put it in AppDelegate but why ?
Expand Down Expand Up @@ -189,7 +192,7 @@ extension ShareAndRightsViewController: UITableViewDelegate, UITableViewDataSour
let cell = tableView.dequeueReusableCell(type: ShareLinkTableViewCell.self, for: indexPath)
cell.initWithPositionAndShadow(isFirst: true, isLast: true, radius: 6)
cell.delegate = self
cell.configureWith(file: file)
cell.configureWith(file: file, currentPackId: packId)
return cell
case .access:
let cell = tableView.dequeueReusableCell(type: UsersAccessTableViewCell.self, for: indexPath)
Expand All @@ -209,6 +212,11 @@ extension ShareAndRightsViewController: UITableViewDelegate, UITableViewDataSour
case .invite:
break
case .link:
guard packId != .myKSuite else {
router.presentUpSaleSheet()
return
}

let canBecomeLink = file?.capabilities.canBecomeSharelink ?? false || file.hasSharelink
if file.isDropbox || !canBecomeLink {
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ import kDriveResources
import UIKit

class NewFolderTypeTableViewController: UITableViewController {
private lazy var packId = DrivePackId(rawValue: driveFileManager.drive.pack.name)

@LazyInjectService private var router: AppNavigable

var driveFileManager: DriveFileManager!
Expand Down Expand Up @@ -103,23 +105,30 @@ class NewFolderTypeTableViewController: UITableViewController {
cell.titleLabel.text = KDriveResourcesStrings.Localizable.dropBoxTitle
cell.accessoryImageView.image = KDriveResourcesAsset.folderDropBox.image
cell.descriptionLabel.text = KDriveResourcesStrings.Localizable.dropBoxDescription
if packId == .myKSuite {
cell.setMykSuiteChip()
}
}
return cell
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if content[indexPath.row] == .dropbox && !driveFileManager.drive.pack.capabilities.useDropbox {
let driveFloatingPanelController = DropBoxFloatingPanelViewController.instantiatePanel()
let floatingPanelViewController = driveFloatingPanelController
.contentViewController as? DropBoxFloatingPanelViewController
floatingPanelViewController?.rightButton.isEnabled = driveFileManager.drive.accountAdmin
floatingPanelViewController?.actionHandler = { _ in
driveFloatingPanelController.dismiss(animated: true) { [weak self] in
guard let self else { return }
router.showStore(from: self, driveFileManager: driveFileManager)
if content[indexPath.row] == .dropbox {
if packId == .myKSuite {
router.presentUpSaleSheet()
} else if !driveFileManager.drive.pack.capabilities.useDropbox {
let driveFloatingPanelController = DropBoxFloatingPanelViewController.instantiatePanel()
let floatingPanelViewController = driveFloatingPanelController
.contentViewController as? DropBoxFloatingPanelViewController
floatingPanelViewController?.rightButton.isEnabled = driveFileManager.drive.accountAdmin
floatingPanelViewController?.actionHandler = { _ in
driveFloatingPanelController.dismiss(animated: true) { [weak self] in
guard let self else { return }
router.showStore(from: self, driveFileManager: driveFileManager)
}
}
present(driveFloatingPanelController, animated: true)
}
present(driveFloatingPanelController, animated: true)
return
} else {
performSegue(withIdentifier: "toNewFolderSegue", sender: indexPath.row)
Expand Down
Loading
Loading