Issue/6849 add signup methods#6914
Conversation
|
No comments from me! |
| import org.wordpress.android.R; | ||
| import org.wordpress.android.ui.WPBottomSheetDialog; | ||
|
|
||
| public class SignupBottomSheetDialog extends WPBottomSheetDialog { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Can the param be just a Context instead of AppCompatActivity? If yes, it's better we use the narrower class.
| android:text="@string/signup_terms_of_service_text" | ||
| app:fixWidowWords="true" | ||
| style="@style/LoginTheme.TextLabel" > | ||
| </android.support.v7.widget.AppCompatTextView> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
| android:layout_width="match_parent" | ||
| android:padding="@dimen/margin_extra_large" | ||
| android:text="@string/signup_terms_of_service_text" | ||
| app:fixWidowWords="true" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Cool trick with the format specifiers, ❤️ that!
| SIGNUP_EMAIL_BUTTON_TAPPED, | ||
| SIGNUP_GOOGLE_BUTTON_TAPPED, | ||
| SIGNUP_TERMS_OF_SERVICE_TAPPED, | ||
| SIGNUP_DISMISSED, |
There was a problem hiding this comment.
👍 for adding Tracks from the get go!
There was a problem hiding this comment.
Agreed. :)
Is there an easy way to get later all the Tracks pieces added in this milestone?
There was a problem hiding this comment.
@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?
There was a problem hiding this comment.
I can't evaluate properly — if it's simple to do, awesome! :D
There was a problem hiding this comment.
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.
|
Design wise, excellent job. |
|
LGTM! |
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.
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
Note
Please, review the copy of the following text from the screenshots above.