Skip to content

[Customer Center] Add colors support#3983

Merged
vegaro merged 13 commits into
integration/customer_support_workflowfrom
06-21-add_colors_support
Jul 19, 2024
Merged

[Customer Center] Add colors support#3983
vegaro merged 13 commits into
integration/customer_support_workflowfrom
06-21-add_colors_support

Conversation

@vegaro

@vegaro vegaro commented Jun 21, 2024

Copy link
Copy Markdown
Member

Builds buttons from the Appearance object in the JSON

@vegaro

vegaro commented Jun 21, 2024

Copy link
Copy Markdown
Member Author

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.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @vegaro and the rest of your teammates on Graphite Graphite

@vegaro vegaro changed the title Add colors support [Customer Center] Add colors support Jun 21, 2024
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 901e975 to 181e73b Compare June 26, 2024 12:47
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 2dbf027 to deb6b1c Compare June 26, 2024 12:47
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 181e73b to 76b9e6a Compare June 26, 2024 12:56
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from deb6b1c to bcbcd19 Compare June 26, 2024 12:56
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 76b9e6a to f8b3f67 Compare June 26, 2024 14:45
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from bcbcd19 to 32b8703 Compare June 26, 2024 14:45
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from f8b3f67 to e86e19c Compare June 27, 2024 10:15
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 32b8703 to b28594e Compare June 27, 2024 10:15
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from e86e19c to bf7e1e0 Compare June 28, 2024 10:19
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from b28594e to 13a91cb Compare June 28, 2024 10:19
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from bf7e1e0 to 9c62db1 Compare June 28, 2024 10:34
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 13a91cb to e968f59 Compare June 28, 2024 10:34
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 9c62db1 to 76decce Compare June 28, 2024 11:06
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from e968f59 to 916da33 Compare June 28, 2024 11:06
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 76decce to 91915ab Compare June 28, 2024 13:24
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 916da33 to 183b2ba Compare June 28, 2024 13:24
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 91915ab to bf9075c Compare July 1, 2024 11:04
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 183b2ba to 46d3308 Compare July 1, 2024 11:04
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from bf9075c to 7e684d9 Compare July 3, 2024 06:31
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 46d3308 to 692a421 Compare July 3, 2024 06:31
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 7e684d9 to e351506 Compare July 5, 2024 13:12
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 900b29e to 7c3975b Compare July 9, 2024 19:49
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from fce0b42 to 974b96c Compare July 9, 2024 19:49
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 7c3975b to 1a2f04a Compare July 10, 2024 09:41
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from 974b96c to c77a831 Compare July 10, 2024 09:41
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 1a2f04a to cd4064f Compare July 10, 2024 12:37
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from c77a831 to cdbd55f Compare July 10, 2024 12:38
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from cd4064f to 263d696 Compare July 10, 2024 13:33
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from cdbd55f to d343c96 Compare July 10, 2024 13:33
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from 263d696 to d841868 Compare July 10, 2024 21:50
@vegaro vegaro force-pushed the 06-21-add_colors_support branch from d343c96 to 3e14981 Compare July 10, 2024 21:50
@vegaro vegaro force-pushed the 06-17-removes_eligibility_from_reponse branch from d841868 to c20eba3 Compare July 15, 2024 17:21

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Indentation seems wrong?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, I wonder if we should pass the whole config data object, instead of each element separately...

Comment thread RevenueCatUI/CustomerCenter/Views/PromotionalOfferView.swift Outdated

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice nice! Just a question and a minor comment.

Comment thread RevenueCatUI/CustomerCenter/ManageSubscriptionsButtonStyle.swift
Comment thread RevenueCatUI/CustomerCenter/ViewModels/ManageSubscriptionsViewModel.swift Outdated

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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 {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

/// Create a view to handle common customer support tasks
public init(customerCenterActionHandler: CustomerCenterActionHandler? = nil) {
public init(customerCenterActionHandler: CustomerCenterActionHandler? = nil,
appearance: CustomerCenterConfigData.Appearance = .default) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we also need to indent this one?

Comment thread Sources/CustomerCenter/CustomerCenterConfigData.swift Outdated
var body: some View {
VStack {
Text(localization.commonLocalizedString(for: .noSubscriptionsFound))
Text(self.configuration.screens[.noActive]?.title ?? "No Subscriptions found")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants