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

DTPP-11 Demo app organize folder structure #307

Merged
merged 5 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
108 changes: 78 additions & 30 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,78 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1001E2B62CF643270023A03C /* CardVault */ = {
isa = PBXGroup;
children = (
1001E2BD2CF644E00023A03C /* CardVaultViewModel */,
3B43290F2A8FD7FD00C5441A /* CardVaultViews */,
);
path = CardVault;
sourceTree = "<group>";
};
1001E2B72CF6432F0023A03C /* PayPalVault */ = {
isa = PBXGroup;
children = (
1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */,
3B2501052B2679F000903EAB /* VaultViews */,
3BB60B512B1F9EE400A298CF /* PayPalVaultViews */,
);
path = PayPalVault;
sourceTree = "<group>";
};
1001E2B82CF643350023A03C /* CardPayments */ = {
isa = PBXGroup;
children = (
1001E2BB2CF6449B0023A03C /* CardPaymentViewModel */,
3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */,
);
path = CardPayments;
sourceTree = "<group>";
};
1001E2B92CF6433C0023A03C /* PayPalWebPayments */ = {
isa = PBXGroup;
children = (
1001E2BA2CF644480023A03C /* PayPalWebViewModel */,
3BA56FFF2A9FF6630081D14F /* PayPalWebPaymentsView */,
);
path = PayPalWebPayments;
sourceTree = "<group>";
};
1001E2BA2CF644480023A03C /* PayPalWebViewModel */ = {
isa = PBXGroup;
children = (
3BA56FFB2A9FEFE90081D14F /* PayPalWebViewModel.swift */,
);
path = PayPalWebViewModel;
sourceTree = "<group>";
};
1001E2BB2CF6449B0023A03C /* CardPaymentViewModel */ = {
isa = PBXGroup;
children = (
3BA56FE62A9DC9D70081D14F /* CardPaymentViewModel.swift */,
3BA56FE82A9DCA520081D14F /* CardPaymentState.swift */,
);
path = CardPaymentViewModel;
sourceTree = "<group>";
};
1001E2BC2CF644BE0023A03C /* PayPalVaultViewModel */ = {
isa = PBXGroup;
children = (
3BB60B542B1FA00C00A298CF /* PayPalVaultViewModel.swift */,
3BA0A58A2B1E240300330681 /* VaultViewModel.swift */,
3B2027402A8A72050007907E /* VaultState.swift */,
Copy link
Collaborator

@KunJeongPark KunJeongPark Nov 26, 2024

Choose a reason for hiding this comment

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

VaultViewModel is a parent class and VaultState is a published state in VaultViewModel, maybe they could be in their own folder along with common vault views - the ones that are done on merchant server?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Screenshot 2024-11-26 at 11 04 24 AM
The PayPalVault -> PayPalVaultViewModel => VaultState, VaultViewModel
PayPalVault -> views under VaultViews, these are common views for merchant side set up for all vault flows.

Could go under just "Vault" folder

Copy link
Collaborator

@KunJeongPark KunJeongPark Nov 26, 2024

Choose a reason for hiding this comment

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

oh I meant outside of the PayPalVault folder. Maybe just "Vault" folder with view models and views. There is PayPal vault, Card vault and other payment methods in the future.
And how about we order the views in sequence of expected events of the main view?

Copy link
Collaborator

Choose a reason for hiding this comment

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

so for example under CardPayments, there are container views like CardPaymentView (which is not a good name, originally it was going to be container view for all the subviews like in CardVault) which has create order, order result result, the SDK portion, approve and result and container view for order completion with capture/authorize and result view

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

so for example under CardPayments, there are container views like CardPaymentView (which is not a good name, originally it was going to be container view for all the subviews like in CardVault) which has create order, order result result, the SDK portion, approve and result and container view for order completion with capture/authorize and result view

maybe i can change the name to CardViewComponents or CardPaymentsScreens ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

CardPaymentView => that actually is the main container view.
CreateOrderCardPaymentView
OrderCreateCardResultView
CardOrderApproveView
CardApprovalResultView
CardPaymentOrderCompletionView
CardOrderActionButton
CardOrderCompletionResultView

Copy link
Collaborator

@KunJeongPark KunJeongPark Nov 26, 2024

Choose a reason for hiding this comment

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

I think CardPaymentView is ok, consistent with PayPalVaultView. I like CardPaymentsScreens ✅.
but we have PayPalWebButtonsView as main container view in PayPalWebPaymentsView.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not too particular, I think having the correct order would make it easier to read.

Copy link
Collaborator

@KunJeongPark KunJeongPark Nov 26, 2024

Choose a reason for hiding this comment

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

Sure! I prefer CardPaymentsScreens over CardViewComponents because it's clearer about which module the container view is for. And that view, imo should be at the very top of the view folder.

);
path = PayPalVaultViewModel;
sourceTree = "<group>";
};
1001E2BD2CF644E00023A03C /* CardVaultViewModel */ = {
isa = PBXGroup;
children = (
3B20273E2A89F24E0007907E /* CardVaultViewModel.swift */,
);
path = CardVaultViewModel;
sourceTree = "<group>";
};
3B2501052B2679F000903EAB /* VaultViews */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -263,17 +335,16 @@
path = CardPaymentViews;
sourceTree = "<group>";
};
3BA56FFF2A9FF6630081D14F /* PayPalWebPayments */ = {
3BA56FFF2A9FF6630081D14F /* PayPalWebPaymentsView */ = {
isa = PBXGroup;
children = (
3BA570062AA0DF330081D14F /* PayPalWebButtonsView.swift */,
3BA570022AA053AE0081D14F /* PayPalWebCreateOrderView.swift */,
3BA570002AA052E80081D14F /* PayPalWebPaymentsView.swift */,
BE8117632B07E778009867B9 /* PayPalWebResultView.swift */,
3B6472A62AFAEB3A004745C4 /* PayPalWebTransactionView.swift */,
3BA56FFB2A9FEFE90081D14F /* PayPalWebViewModel.swift */,
);
path = PayPalWebPayments;
path = PayPalWebPaymentsView;
sourceTree = "<group>";
};
3BB60B512B1F9EE400A298CF /* PayPalVaultViews */ = {
Expand All @@ -300,13 +371,6 @@
path = CommonComponents;
sourceTree = "<group>";
};
53B9E8E828C93B2B00719239 /* Helpers */ = {
isa = PBXGroup;
children = (
);
path = Helpers;
sourceTree = "<group>";
};
805AB84C26B87A87003BEE0D /* Frameworks */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -349,8 +413,11 @@
806F1E3726B85367007A60E6 /* Demo */ = {
isa = PBXGroup;
children = (
1001E2B92CF6433C0023A03C /* PayPalWebPayments */,
1001E2B82CF643350023A03C /* CardPayments */,
1001E2B72CF6432F0023A03C /* PayPalVault */,
1001E2B62CF643270023A03C /* CardVault */,
806C7A812C000626000E85E8 /* Demo.entitlements */,
53B9E8E828C93B2B00719239 /* Helpers */,
806F1E4126B85369007A60E6 /* Assets.xcassets */,
BED0422F2710833100C80954 /* Card */,
BECD849E27036D95007CCAE4 /* DemoSettings */,
Expand All @@ -360,7 +427,6 @@
80F33CEB26F8E799006811B1 /* Models */,
BE1766B526FA562B007EF438 /* Networking */,
BEDE3047275E998700D275FD /* SwiftUIComponents */,
BE4876A827567D4200802EAF /* ViewModels */,
3BCCFE482A9D96CA00C5102F /* DemoApp.swift */,
);
path = Demo;
Expand Down Expand Up @@ -411,19 +477,6 @@
path = Networking;
sourceTree = "<group>";
};
BE4876A827567D4200802EAF /* ViewModels */ = {
isa = PBXGroup;
children = (
3B20273E2A89F24E0007907E /* CardVaultViewModel.swift */,
3BA0A58A2B1E240300330681 /* VaultViewModel.swift */,
3B2027402A8A72050007907E /* VaultState.swift */,
3BA56FE62A9DC9D70081D14F /* CardPaymentViewModel.swift */,
3BA56FE82A9DCA520081D14F /* CardPaymentState.swift */,
3BB60B542B1FA00C00A298CF /* PayPalVaultViewModel.swift */,
);
path = ViewModels;
sourceTree = "<group>";
};
BECD849E27036D95007CCAE4 /* DemoSettings */ = {
isa = PBXGroup;
children = (
Expand All @@ -446,12 +499,7 @@
BEDE3047275E998700D275FD /* SwiftUIComponents */ = {
isa = PBXGroup;
children = (
3B2501052B2679F000903EAB /* VaultViews */,
3BB60B512B1F9EE400A298CF /* PayPalVaultViews */,
3BA56FFF2A9FF6630081D14F /* PayPalWebPayments */,
3BA56FEA2A9DCBB30081D14F /* CardPaymentViews */,
3BCCFE472A9D962E00C5102F /* CommonComponents */,
3B43290F2A8FD7FD00C5441A /* CardVaultViews */,
CB9ED44D28411B110081F4DE /* SwiftUIPaymentButtonDemo.swift */,
3BCCFE4A2A9D985F00C5102F /* FeatureSelectionView.swift */,
BE8117672B080472009867B9 /* CurrentState.swift */,
Expand Down