Closed kamilraczka closed 1 week ago
Hello @kamilraczka,
Thank you very much for raising this issue and your detailed description. Also for digging into the code and providing additional context. It is very helpful for us to receive feedback so we can improve the SDK further. Especially for adding your bonus info! We are glad to hear that you like the SDK 💚
I will look into the issue and apply your findCardComponentStyle()
to verify that it will resolve the problem. On a first glance it might be a bug because your configuration looks fine. But I will try to reproduce it and add a fix.
Like you also mentioned, setting the background to white as default shouldn't take place any longer. I will create a PR to change that and keep you updated.
Hi @kamilraczka,
I would like to provide a quick update. As mentioned, I've adjusted the appearance providers and moved to the strict type.
I tested your configuration and it seems to work. Would it be possible for you testing the branch feature/improveAppearanceProvider
as well? Your feedback would be great.
Hi @kamilraczka, I would like to provide a short follow up. We decided to improve styling experience by simplifying the setup. The AdyenAppearance enum is now exposed. You can just override the style and it will be applied. Implementing the AdyenComponentAppearanceProvider interface is no longer required. Feel free to have a look into our example and in case of questions, please reopen this issue.
Hello @Robert-SD!
First of all, sorry for my late response - I didn't check the previous changes on the branch you have linked but I am going to try the new ones. In case of any problems I am going to let you know. Thanks for quick actions though!
Describe the bug
I am using the Card component from the library. The component itself is working fine on both platforms but the problem comes with the styling itself - on Android I was able to apply custom style but iOS version of the app doesn't reflect the changes I put inside the
AdyenAppearance
class. I did everything whatREADME.md
and your examples say but the changes are not shown in my app.Below I am providing my research's result also.
To Reproduce
Steps to reproduce the behavior:
AppDelegate.swift
as your example shows:@UIApplicationMain @objc class AppDelegate: FlutterAppDelegate { override func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { GeneratedPluginRegistrant.register(with: self) return super.application(application, didFinishLaunchingWithOptions: launchOptions) } }
class AdyenAppearance: AdyenComponentAppearanceProvider { static func createCardComponentStyle() -> Adyen.FormComponentStyle { var style = Adyen.FormComponentStyle() style.mainButtonItem.button.backgroundColor = .red style.mainButtonItem.button.title.color = .green return style } }
which is pretty much the same as the original "provider finder" but
.compactMap
has a strict type. This solution doesn't return the nil value andfindCardComponentStyle()
method returns me correctFormComponentStyle
from myAppDelegate.swift
file. I didn't open any Pull Request because I am not sure how much you want to proceed with the generic provider finder.Bonus info
111th line from
ConfigurationMapper.swift
always override the background as the white one. I also don't think it should take place on the customisation since the card component then has no possibility to apply other background than white (e.g. in my case I'd love to override the background color to the gray one).Does all the changes I mentioned above should be classified as the bugs in the library or maybe I am doing something wrong with configuration?
Looking forward to hear your opinion guys and btw: thanks for the library, it really saves time!