Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Conversation

@ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Mar 19, 2020

Fixes: #155, wordpress-mobile/WordPress-iOS#13466
Ref: wordpress-mobile/WordPress-iOS#13620

The main goal here is to update the SIWA button to be consistent with the other Login/Signup buttons. However, because Apple has rules about custom SIWA buttons, other parts of the button view had be updated to match. As it happens, @mattmiklic 's Unified Auth design worked perfectly.

So, this change updates:

  • The Login and Signup SIWA button appearance.
  • The other buttons to match SIWA and the new design. Specifically:
    • Button size.
    • Button label font.
    • Non-primary button background colors. (i.e. the buttons that aren't pink.)
    • Button area background color.

This can be tested with WPiOS PR: wordpress-mobile/WordPress-iOS#13686

Copy link
Contributor

@mindgraffiti mindgraffiti left a comment

Choose a reason for hiding this comment

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

✅ Code
✅ UI tested

:shipit:

///
static var linkFieldImage: UIImage {
return UIImage(named: "icon-url-field", in: bundle, compatibleWith: nil)!
return UIImage(named: "icon-url-field", in: bundle, compatibleWith: nil) ?? UIImage()
Copy link
Contributor

Choose a reason for hiding this comment

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

😎

let appleButton = WPStyleGuide.appleLoginButton()
appleButton.addTarget(self, action: #selector(handleAppleButtonTapped), for: .touchDown)
buttonViewController.stackView?.insertArrangedSubview(appleButton, at: 3)
buttonViewController.setupTertiaryButtonFor(socialService: .apple, onTap: handleAppleButtonTapped)
Copy link
Contributor

Choose a reason for hiding this comment

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

🤩


let buttonString = NSMutableAttributedString(attachment: googleAttachment)
let googleTitle = NSLocalizedString(" Continue with Google", comment: "Button title. Tapping begins log in using Google. There is a leading space to separate it from the Google logo.")
let googleTitle = NSLocalizedString(" Continue with Google", comment: "Button title. Tapping begins log in using Google. There are leading spaces to separate it from the Google logo.")
Copy link

Choose a reason for hiding this comment

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

Could we please revert this? It changes translatable strings unnecessarily and whitespace around translations is discouraged and stripped from our systems. What about this?

let googleTitle = "  " + NSLocalizedString("Continue with Google", comment: "Button title. Tapping begins log in using Google. There are leading spaces to separate it from the Google logo.")

@mindgraffiti mindgraffiti added this to the 1.11.0 milestone Mar 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NUX buttons are truncated on smaller devices

4 participants