[Customer Center] Add colors support#3983
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
901e975 to
181e73b
Compare
2dbf027 to
deb6b1c
Compare
181e73b to
76b9e6a
Compare
deb6b1c to
bcbcd19
Compare
76b9e6a to
f8b3f67
Compare
bcbcd19 to
32b8703
Compare
f8b3f67 to
e86e19c
Compare
32b8703 to
b28594e
Compare
e86e19c to
bf7e1e0
Compare
b28594e to
13a91cb
Compare
bf7e1e0 to
9c62db1
Compare
13a91cb to
e968f59
Compare
9c62db1 to
76decce
Compare
e968f59 to
916da33
Compare
76decce to
91915ab
Compare
916da33 to
183b2ba
Compare
91915ab to
bf9075c
Compare
183b2ba to
46d3308
Compare
bf9075c to
7e684d9
Compare
46d3308 to
692a421
Compare
7e684d9 to
e351506
Compare
900b29e to
7c3975b
Compare
fce0b42 to
974b96c
Compare
7c3975b to
1a2f04a
Compare
974b96c to
c77a831
Compare
1a2f04a to
cd4064f
Compare
c77a831 to
cdbd55f
Compare
cd4064f to
263d696
Compare
cdbd55f to
d343c96
Compare
263d696 to
d841868
Compare
d343c96 to
3e14981
Compare
d841868 to
c20eba3
Compare
tonidero
left a comment
There was a problem hiding this comment.
Just some suggestions but LGTM! It might also be good to try to get some iOS dev to double check, but I think this should be ok for now.
| let viewModel = ManageSubscriptionsViewModel(screen: screen, localization: localization) | ||
| init(screen: CustomerCenterConfigData.Screen, | ||
| localization: CustomerCenterConfigData.Localization, | ||
| appearance: CustomerCenterConfigData.Appearance) { |
There was a problem hiding this comment.
Also, I wonder if we should pass the whole config data object, instead of each element separately...
JayShortway
left a comment
There was a problem hiding this comment.
Nice nice! Just a question and a minor comment.
JayShortway
left a comment
There was a problem hiding this comment.
Looking pretty fancy! Cool to get this in! I'll leave approval to someone with a bit more context.
| @available(tvOS, unavailable) | ||
| @available(watchOS, unavailable) | ||
| @available(visionOS, unavailable) | ||
| struct TintedProgressView: View { |
| /// Create a view to handle common customer support tasks | ||
| public init(customerCenterActionHandler: CustomerCenterActionHandler? = nil) { | ||
| public init(customerCenterActionHandler: CustomerCenterActionHandler? = nil, | ||
| appearance: CustomerCenterConfigData.Appearance = .default) { |
There was a problem hiding this comment.
Same here as in the promotional offers PR. I wonder if we need a default Appearance or if we can just pass nil to the environment... However, I think this is better in this case since default to .system makes more sense than defaulting to a specific language.
| import Foundation | ||
|
|
||
| // swiftlint:disable missing_docs | ||
| public typealias RCColor = PaywallColor |
There was a problem hiding this comment.
Hmm I wonder if we should make this a more global typealias (outside the CustomerCenter folder)... Even better, we might want to have the main type be RCColor and change everything to that and just keep PaywallColor as a typealias instead? But that can come on future PRs as well.
| dark: try! RCColor(stringRepresentation: "#000000")), | ||
| backgroundColor: try! .init(light: RCColor(stringRepresentation: "#000000"), | ||
| dark: try! RCColor(stringRepresentation: "#ffffff")), | ||
| textColor: try! .init(light: RCColor(stringRepresentation: "#000000"), |
There was a problem hiding this comment.
Do we also need to indent this one?
| var body: some View { | ||
| VStack { | ||
| Text(localization.commonLocalizedString(for: .noSubscriptionsFound)) | ||
| Text(self.configuration.screens[.noActive]?.title ?? "No Subscriptions found") |
There was a problem hiding this comment.
We should come back to this since we shouldn't need to fallback here. Also, we need to build the buttons below from the paths provided by the backend.

Builds buttons from the Appearance object in the JSON