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

Colors set in threeDSecureParams are mostly ignored #182

Closed
benomatis opened this issue May 4, 2021 · 22 comments · Fixed by #184 or #234
Closed

Colors set in threeDSecureParams are mostly ignored #182

benomatis opened this issue May 4, 2021 · 22 comments · Fixed by #184 or #234

Comments

@benomatis
Copy link
Collaborator

I tried setting the main color (themeColors.brandBlue) everywhere I could, but the only thing that changed is the text in the middle - that's the colour everything that is now violet should have. How can I achieve that?

<StripeProvider
  publishableKey={key}
  threeDSecureParams={{
    backgroundColor: '#FFFFFF', // iOS only
    timeout: 5,
    label: {
      headingTextColor: themeColors.brandBlue,
      headingFontSize: 13
    },
    navigationBar: {
      headerText: 'Complete card authentication',
      statusBarColor: themeColors.brandBlue // Android only
    },
    footer: {
      // iOS only
      backgroundColor: themeColors.brandBlue,
      headingTextColor: '#FFFFFF',
      textColor: '#FFFFFF'
    },
    submitButton: {
      backgroundColor: themeColors.brandBlue,
      borderRadius: 0,
      textColor: '#FFFFFF',
      textFontSize: 14
    }
  }}>
  <Component />
</StripeProvider>

@benomatis benomatis changed the title Colors set in threeDSecureParams are largely ignored Colors set in threeDSecureParams are mostlz ignored May 5, 2021
@benomatis benomatis changed the title Colors set in threeDSecureParams are mostlz ignored Colors set in threeDSecureParams are mostly ignored May 5, 2021
@arekkubaczkowski
Copy link
Collaborator

arekkubaczkowski commented May 6, 2021

to change the navigation bar color you have to set also backgroundColor since statusBarColor concerns the system bar at the very top of the screen

 navigationBar: {
      headerText: 'Complete card authentication',
      statusBarColor: themeColors.brandBlue,
     backgroundColor: '#c0c0c0' // <-- this one
    },

but there is also some glitch with setting statusBarColor which doesn't work until we set a backgroundColor @michelleb-stripe could you take a look on this? it's about Stripe3ds2ToolbarCustomization

regarding the submit button I have noticed a bug which I have just fixed.

this is what I achieved with above hints and the button fix:
Zrzut ekranu 2021-05-6 o 08 33 41

@benomatis
Copy link
Collaborator Author

benomatis commented May 6, 2021

@arekkubaczkowski This looks way better indeed, if the submit button will be fixed (when will that be released? I know I can just patch it in the interim with your fix), the only remaining thing I have not raised here is the spinning wheel that appears after I submit the card and before this popup appears, that's still purple. Any ways that could be changed?

...and one more thing: when I tap the 'Learn more about authentication' or 'Need help', the text below them is revealed, but those section titles get hidden, they then will show again if I type the down (up) arrow again - is this expected or did I set one of the colours to white where I should have not?

@arekkubaczkowski
Copy link
Collaborator

arekkubaczkowski commented May 6, 2021

...and one more thing: when I tap the 'Learn more about authentication' or 'Need help', the text below them is revealed, but those section titles get hidden, they then will show again if I type the down (up) arrow again - is this expected or did I set one of the colours to white where I should have not?

yes, I think it's caused by changed some text color

the only remaining thing I have not raised here is the spinning wheel that appears after I submit the card and before this popup appears, that's still purple. Any ways that could be changed?

@michelleb-stripe any ideas how to change it?

@benomatis
Copy link
Collaborator Author

opened #185 for the loading spinner color bit

@michelleb-stripe
Copy link
Contributor

michelleb-stripe commented May 6, 2021

to change the navigation bar color you have to set also backgroundColor since statusBarColor concerns the system bar at the very top of the screen

 navigationBar: {
      headerText: 'Complete card authentication',
      statusBarColor: themeColors.brandBlue,
     backgroundColor: '#c0c0c0' // <-- this one
    },

but there is also some glitch with setting statusBarColor which doesn't work until we set a backgroundColor @michelleb-stripe could you take a look on this? it's about Stripe3ds2ToolbarCustomization

regarding the submit button I have noticed a bug which I have just fixed.

this is what I achieved with above hints and the button fix:
Zrzut ekranu 2021-05-6 o 08 33 41

Can you clarify what version of the SDK you are using? There was a related fix in version 16.7.1

@michelleb-stripe
Copy link
Contributor

...and one more thing: when I tap the 'Learn more about authentication' or 'Need help', the text below them is revealed, but those section titles get hidden, they then will show again if I type the down (up) arrow again - is this expected or did I set one of the colours to white where I should have not?

yes, I think it's caused by changed some text color

the only remaining thing I have not raised here is the spinning wheel that appears after I submit the card and before this popup appears, that's still purple. Any ways that could be changed?

@michelleb-stripe any ideas how to change it?

Is the reference to the spinning wheel this one:

  1. Open the sheet
  2. Enter a 3DS2 card ****3220
  3. Press Buy Button
  4. Spinner appears with the card logo <-- This spinner?

@benomatis
Copy link
Collaborator Author

@michelleb-stripe

Can you clarify what version of the SDK you are using? There was a related fix in version 16.7.1

Sorry, what SDK do you mean exactly?

Is the reference to the spinning wheel this one:

  1. Open the sheet
  2. Enter a 3DS2 card ****3220
  3. Press Buy Button
  4. Spinner appears with the card logo <-- This spinner?

Yes

@benomatis
Copy link
Collaborator Author

@michelleb-stripe the spinner also appears when you tap the 'Complete Authentication' button.

@benomatis
Copy link
Collaborator Author

@arekkubaczkowski I just upgraded stripe-react-native locally following your fix and I'm seeing the Visa logo has now lost its colours. It doesn't look like it's your changes, per se, may have been something else elsewhere that I picked up with that upgrade (screenshot below).

@michelleb-stripe This also shows the spinner I'm talking about, between the card logo and the 'Processing...' text.

@michelleb-stripe
Copy link
Contributor

Great! That is helpful information. What version of stripe-react-native are you using?

@benomatis
Copy link
Collaborator Author

I thought it only had 0.0.1, maybe I'm missing something @michelleb-stripe?

@benomatis
Copy link
Collaborator Author

benomatis commented May 6, 2021

@michelleb-stripe or @arekkubaczkowski pls tell me if this should go into a separate issue, but using the same set up as what you can see in the description, this is how it looks at the moment on iOS - the header appears to be a darker version of my picked color (appears to be influenced by footer.backgroundColor but it appears to make that color just darker for some reason), the Cancel button and the 'Complete Authentication' button appears to be the standard (iOS) blue:

@michelleb-stripe
Copy link
Contributor

To summarize here are the issues still unresolved in this closed issue:

Are there any other issues that I missed?

@benomatis
Copy link
Collaborator Author

benomatis commented May 6, 2021

@michelleb-stripe I have a couple of tiny corrections to make...

I'll report the Android related ones in #185, but for the iOS one, there are 3 issues:

  • 1. Background color of navigationBar. headerText (that reads 'Complete card authentication' for me as I had set it explicitly to that) is a darkened version of footer.backgroundColor - why is it darkened? Can this be changed?
  • 2. The background color of the 'Complete Authentication' button is probably the iOS default.
  • 3. The color of the 'Cancel' button next to navigationBar. headerText also appears to be the iOS default.

@benomatis
Copy link
Collaborator Author

@michelleb-stripe on point 1 above, I just tested: the header background colour on iOS appears to be a darkened version of footer.backgroundColor - very odd.

@davidme-stripe
Copy link
Collaborator

  1. @benomatis, Can you try setting translucent: false in the navigationBar settings? That should disable the unexpected translucency effect in the bar.
  2. @arekkubaczkowski I think in these mappers, the RN SDK will need to also call setButtonCustomization, as it's currently only making a copy of the button customization and then mutating it.
  3. @arekkubaczkowski The mapper will also need to allow customization of STPThreeDSCustomizationButtonType.cancel.

@benomatis
Copy link
Collaborator Author

@davidme-stripe If I set translucent: false the header background color becomes black, and I have no way to change it. Below is a screenshot of it and my current settings:

    {
      backgroundColor: '#22ff00', // iOS only --- WHITE
      timeout: 5,
      label: {
        headingTextColor: themeColors.brandBlue,
        headingFontSize: 13
      },
      navigationBar: {
        translucent: false,
        barStyle: 1,
        headerText: 'Complete card authentication',
        statusBarColor: '#FFFFFF', // Android only
        backgroundColor: themeColors.brandBlue
      },
      footer: {
        // iOS only
        backgroundColor: '#ff0000' // WHITE
      },
      submitButton: {
        backgroundColor: themeColors.brandBlue,
        borderRadius: 0,
        textColor: '#ffcd00', // WHITE
        textFontSize: 14
      }
    }

@benomatis
Copy link
Collaborator Author

@davidme-stripe adding barTintColor solves the issue with the header colour, it looks pretty neat now except for the 'Cancel' and the 'Complete Authentication' buttons, they still appear to ignore any styling changes I attempt to do to them.

@michelleb-stripe Is this going to be taken care of in this issue (and thus re-opened?) or shall I open a new one?

@michelleb-stripe
Copy link
Contributor

@benomatis, Do we have all the android related items captured in: #185?

@benomatis
Copy link
Collaborator Author

@michelleb-stripe yes, and for iOS, we really only have the issue with the colors of those 2 buttons remaining.

@davidme-stripe
Copy link
Collaborator

I filed a new issue for the iOS changes: #201

@benomatis
Copy link
Collaborator Author

thank you @davidme-stripe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants