Skip to content

Issue/6849 add signup methods#6914

Merged
hypest merged 13 commits intofeature/new-signupfrom
issue/6849-add-signup-methods
Nov 29, 2017
Merged

Issue/6849 add signup methods#6914
hypest merged 13 commits intofeature/new-signupfrom
issue/6849-add-signup-methods

Conversation

@theck13
Copy link
Copy Markdown
Contributor

@theck13 theck13 commented Nov 28, 2017

Fix

Add panel that slides up when the Sign Up button is tapped on the prologue screen which displays the signup methods as described in #6849. See the screenshots below for illustration. The first screenshots show the button text change on the prologue screen. The second screenshots show the signup panel in portrait orientation. The third screenshots show the signup panel in landscape orientation. Notice the third screenshots have a blank image for the Design screenshot since there was no design for the landscape orientation.

auth_signup_screenshot_01_method_prologue

auth_signup_screenshot_01_method_port

auth_signup_screenshot_01_method_land

The landscape layout was derived from the prologue landscape layout. The style used for the Terms of Service text is the same as the label text in the login flow. The style used for the Sign Up with Email and Sign Up with Google buttons is the same as the Sign Up button on the prologue screen.

Test

  1. Clear app data.
  2. Notice Sign Up button text.
  3. Tap Sign Up button.
  4. Notice signup options.
  5. Tap Sign Up with Email button.
  6. Notice signup screen is shown.

Note

Please, review the copy of the following text from the screenshots above.

By choosing "Sign up," you agree to our Terms of Service.

@aerych aerych mentioned this pull request Nov 28, 2017
10 tasks
@michelleweber
Copy link
Copy Markdown

No comments from me!

@hypest hypest self-assigned this Nov 28, 2017
Copy link
Copy Markdown
Contributor

@hypest hypest left a comment

Choose a reason for hiding this comment

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

This works smoothly @theck13 , at least from my POV :)

I left a few comments, nothing really major. Let me know if something is not clear. Thanks!

import org.wordpress.android.R;
import org.wordpress.android.ui.WPBottomSheetDialog;

public class SignupBottomSheetDialog extends WPBottomSheetDialog {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are there perhaps any plans for expanding SignupBottomSheetDialog as the feature implementation progresses?

If not, and since SignupBottomSheetDialog is just a helper to setup and launch a WPBottomSheetDialog, I'd propose to reduce it to just a static .show(params) method. SignupBottomSheetDialog will not need to inherit from anything and there will also be no need for instance variables (like mResources). WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not a fan of the instance variables like mResources either. However, having the SignupBottomSheetDialog instance variable in LoginActivity will help handle the view in the callbacks from the Google signup interface in subsequent changes (i.e. #6850).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed the instance variables from SignupBottomSheetDialog in a655a60.

private Resources mResources;
private TextView mTermsOfServiceText;

public SignupBottomSheetDialog(@NonNull final AppCompatActivity activity, @NonNull final SignupSheetListener signupSheetListener) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can the param be just a Context instead of AppCompatActivity? If yes, it's better we use the narrower class.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I updated the parameter in 8e35781.

android:text="@string/signup_terms_of_service_text"
app:fixWidowWords="true"
style="@style/LoginTheme.TextLabel" >
</android.support.v7.widget.AppCompatTextView>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Mostly curious here, is the ending tag (</android.support.v7.widget.AppCompatTextView>) recommended by a linter hint perhaps? Asking since for non-container elements like a TextView, I usually consider the ending tag just noise but I might be missing something in this case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not required, but I find it easier to read and more consistent if all elements have both tags.


<android.support.v7.widget.AppCompatTextView
android:id="@+id/signup_tos"
android:background="?attr/selectableItemBackground"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

May I suggest basing the TOS label on a proper button so to enable keyboard navigation (tabbing) and click of it? An example of that is the secondary button on the login screens.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I updated the label in 4715fe9.

android:layout_width="match_parent"
android:padding="@dimen/margin_extra_large"
android:text="@string/signup_terms_of_service_text"
app:fixWidowWords="true"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, is this attribute actually used here? The parent element is a AppCompatTextView and I'm not sure how the custom attribute can be picked up in this case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nope, it is not used. That is a copy/paste error. I removed it in 92968dc.


<!-- Signup -->
<string name="sign_up">Sign Up</string>
<string name="signup_terms_of_service_text">By choosing \"Sign up,\" you agree to our %1$sTerms of Service%2$s.</string>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cool trick with the format specifiers, ❤️ that!

SIGNUP_EMAIL_BUTTON_TAPPED,
SIGNUP_GOOGLE_BUTTON_TAPPED,
SIGNUP_TERMS_OF_SERVICE_TAPPED,
SIGNUP_DISMISSED,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍 for adding Tracks from the get go!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Agreed. :)
Is there an easy way to get later all the Tracks pieces added in this milestone?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@folletto , since we're using a feature branch to gather the work on SignUp and SiteCreation, the final PR to merge to develop will have a quite easy way to see all the events added. We will just need to checkout the AnalyticsTracker.java file. Does that sound practical to you?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I can't evaluate properly — if it's simple to do, awesome! :D

Copy link
Copy Markdown
Contributor

@hypest hypest Nov 28, 2017

Choose a reason for hiding this comment

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

Example (taken from when the new Login was merged into develop): https://github.com/wordpress-mobile/WordPress-Android/pull/6423/files#diff-578f7e9e6f43c37a5ca1ee823a493989

All the new Tracks added by the feature will be in a more-or-less single view and highlighted.

@folletto
Copy link
Copy Markdown
Contributor

Design wise, excellent job.
Extra excellent for aligning some of the details to the existing codebase for consistency 👌

@folletto folletto removed the [Status] Needs Design Review A designer needs to sign off on the implemented design. label Nov 28, 2017
@hypest
Copy link
Copy Markdown
Contributor

hypest commented Nov 29, 2017

LGTM!

@hypest hypest merged commit 1540a95 into feature/new-signup Nov 29, 2017
@hypest hypest deleted the issue/6849-add-signup-methods branch November 29, 2017 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants