Fix AdyenTheme with public access control and making some more todos on this topic#2465
Fix AdyenTheme with public access control and making some more todos on this topic#2465robertdalmeida wants to merge 6 commits intodevelopfrom
Conversation
…ge/internal to public visibility
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the extensibility of the Adyen UI theming system by making core components, specifically Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the access control of several initializers and methods in AdyenColors and AdyenTheme from package or internal to public. It also refactors the AdyenColors initializer by removing supportShadow as a direct parameter and includes TODO comments for future documentation and visibility improvements. A critical issue was identified where the attributes(_:) function in AdyenTheme was made public, but its AdyenAttributes parameter retains package access, which will lead to a compilation error.
| /// - Parameter attributes: The UI attributes to apply. | ||
| /// - Returns: A new `AdyenTheme` instance. | ||
| internal func attributes(_ attributes: AdyenAttributes) -> AdyenTheme { | ||
| public func attributes(_ attributes: AdyenAttributes) -> AdyenTheme { |
There was a problem hiding this comment.
This function has been changed to public, but its parameter attributes is of type AdyenAttributes, which has package access control. A public function cannot accept a non-public type as a parameter. This will result in a compilation error.
To resolve this, you should either make AdyenAttributes and its properties public (which would require changes in AdyenAttributes.swift), or revert this function's access level to internal.
| public func attributes(_ attributes: AdyenAttributes) -> AdyenTheme { | |
| internal func attributes(_ attributes: AdyenAttributes) -> AdyenTheme { |
There was a problem hiding this comment.
There was no plan to expose it publicly. We want to have full control over what merchants can override and we use a builder pattern for this, adding helper methods such as bodyLabel() and so on.
…from package to public
|
ℹ️ No baseline data found for 'develop'.
|
👀 2 public changes detectedComparing
|
Summary
Discussion MR on the AdyenTheme.
Adding todos about ways to improve the theming from an integration point of view.
For example, if i ask what should the color of a secondary button be, what color should i use?
Pubilc API usage how it would look for the merchant