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

Conversation

@nheagy
Copy link
Contributor

@nheagy nheagy commented Jul 15, 2019

To finish my efforts to use the new WPiOS color scheme during login, this PR makes the remaining colors from the old WPiOS color palette configurable. It also removes the default WordPressAuthenticatorStyle, and makes the style argument mandatory.

This will have compatibility implications for the other projects that use this pod.

Examples:

image
image

@nheagy nheagy added the enhancement New feature or request label Jul 15, 2019
@nheagy nheagy self-assigned this Jul 15, 2019
@aerych
Copy link
Contributor

aerych commented Jul 16, 2019

Heya @nheagy ! Looking good from here. I think CI is being cranky about this warning:
Screen Shot 2019-07-16 at 10 16 04 AM

Thoughts?

@nheagy
Copy link
Contributor Author

nheagy commented Jul 16, 2019

@aerych I hadn't noticed that. Pushed another commit to move font into the guard.

Copy link
Contributor

@aerych aerych left a comment

Choose a reason for hiding this comment

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

Shiny! Retested and the warning is gone. Code looks good. :shipit: from me.

@nheagy
Copy link
Contributor Author

nheagy commented Jul 16, 2019

@aerych I pushed one more commit as I found some more colors to change in the signup epilogue. Care to give it a glance?

@aerych
Copy link
Contributor

aerych commented Jul 16, 2019

Hard to not miss a few strays given the amount of code here. :) Its all good. My :shipit: stands.

Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

the changes look good, just a non-blocking nit!

I was testing your branch in WCiOS, and the UI from launch to logging in with username/password/2FA looks great (we just need to specify the new color arguments). However, I wasn't able to test logging in by entering site address. Something between version 1.5.2 and 1.5.3 seems to make it not work:

CredStore - performQuery - Error copying matching creds.  Error=-50, query={
    "m_Limit" = "m_LimitAll";
    ptcl = htps;
    srvr = "funtestingusa.wpcomstaging.com";
    sync = syna;
}

were there any changes we had to make when updating the WordPressAuthenticator pod from < 1.5.3 to > 1.5.3 on WPiOS?

.foregroundColor: WordPressAuthenticator.shared.style.placeholderColor,
.font: font
]
self.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: attributes)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: self might not be necessary?

nheagy added 2 commits July 17, 2019 09:30
- also makes it more reliable, previously it was only colored once and if changed it reverted to iOS default (which was happening for unknown reasons)
@nheagy
Copy link
Contributor Author

nheagy commented Jul 17, 2019

Thanks for your reviews! Does one of you have time for a small re-review?

@jaclync based on your prod to fix self.attributedPlaceholder I feel into a rabbit hole and simplified this code quite a bit!

@nheagy nheagy requested a review from jaclync July 17, 2019 17:01
Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

just a question about the color change and a non-blocking nit, otherwise LGTM!

blavatarImageView.layer.borderColor = WordPressAuthenticator.shared.style.instructionColor.cgColor
blavatarImageView.layer.borderWidth = 1
blavatarImageView.tintColor = WPStyleGuide.greyLighten10()
blavatarImageView.tintColor = WordPressAuthenticator.shared.style.instructionColor
Copy link
Contributor

Choose a reason for hiding this comment

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

the old diffs seem to have different shades of grey for the border and tint, and the new diffs seem to have the same - just double checking this is an intentional change?

self.secondaryTitleColor = secondaryTitleColor
self.disabledTitleColor = disabledTitleColor
self.textButton = textButton
self.textButtonHighlight = textButtonHighlight
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry didn't comment on this earlier, a non-blocking nit: maybe buttonTextColor/buttonTextHighlightedColor would sound more clear that these two are colors not buttons? also more consistent with the names of other arguments (same for the property names)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree, these should be suffixed with Color.

This whole struct has gotten a bit big for my tastes, but I'll leave a more thorough refactor for another time 😉

@nheagy
Copy link
Contributor Author

nheagy commented Jul 17, 2019

@jaclync great suggestions, now fixed!

Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

@nheagy nheagy merged commit 46ff81a into develop Jul 17, 2019
@nheagy
Copy link
Contributor Author

nheagy commented Jul 17, 2019

Thanks @jaclync and @aerych!

@nheagy nheagy deleted the issues/11683-more-color-changes branch July 17, 2019 19:27
jkmassel pushed a commit that referenced this pull request Jul 17, 2019
…-changes

Make remaining colors configurable
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants