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

UL&S: SiteCredentialsViewController username and password fields #329

Merged
merged 35 commits into from
Jul 21, 2020

Conversation

mindgraffiti
Copy link
Contributor

@mindgraffiti mindgraffiti commented Jul 20, 2020

Ref. #283

This PR adds the password type to the TextfieldTableViewCell and adds the username and password textfields to SiteCredentialsViewController. The "Continue" button is not yet implemented because this PR was getting kinda big.

Test PR: wordpress-mobile/WordPress-iOS#14492

  1. bundle exec pod install
  2. Build and run
  3. Visit the test PR to see UI changes

Copy link
Contributor

@Gio2018 Gio2018 left a comment

Choose a reason for hiding this comment

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

Hey @mindgraffiti ! Just had one small thing in the code, thanks!!

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

configureSubmitButton(animating: false)
Copy link
Contributor

Choose a reason for hiding this comment

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

This call already exists in viewDidLoad(), so maybe it should be removed from here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed them both for now. This PR was meant to focus on the username and password textfields. I shouldn't have put in the configuration method for the Continue button.

Copy link
Contributor

@ScoutHarris ScoutHarris 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 couple code nitpicks. Otherwise, :shipit: !

Comment on lines 96 to 98
if showSecureTextEntryToggle == false {
return
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a suggestion - maybe this could be a guard?

guard showSecureTextEntryToggle else {
	return
}	

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I converted the Obj-C class WPWalkthroughTextField into Swift and forgot to make the code actually Swift-y 😀

func setSecureTextEntry(_ secureTextEntry: Bool) {
// This is a fix for a bug where the text field reverts to a system
// serif font if you disable secure text entry while it contains text.
textField.font = nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Is setting it to nil necessary since it's immediately followed by setting the font? I commented it out and didn't see a difference.

@mindgraffiti mindgraffiti requested a review from Gio2018 July 21, 2020 14:28
Copy link
Contributor

@Gio2018 Gio2018 left a comment

Choose a reason for hiding this comment

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

:shipit:!

@mindgraffiti
Copy link
Contributor Author

Thank you for the reviews Giorgio and Stephenie!

@mindgraffiti mindgraffiti merged commit 8849827 into develop Jul 21, 2020
@mindgraffiti mindgraffiti deleted the feature/322-site-credentials-i branch July 21, 2020 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants