-
Notifications
You must be signed in to change notification settings - Fork 858
FTUE - Combined registration #5648
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
Conversation
d1bed4b to
0ffd20e
Compare
62044f3 to
fcb7c73
Compare
amshakal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's looking great. As discussed, eventually we will have an edit button added to this screen for the user to change their server.
TY!
fcb7c73 to
9c044fb
Compare
mnaturel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just small remarks mainly about naming.
| val onboardingSplashCarousel = booleanPreferencesKey("onboarding-splash-carousel") | ||
| val onboardingUseCase = booleanPreferencesKey("onbboarding-splash-carousel") | ||
| val onboardingPersonalize = booleanPreferencesKey("onbboarding-personalize") | ||
| val onboardingCombinedChooseServer = booleanPreferencesKey("onbboarding-combined-choose-server") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it intended on some keys the "b" of "onboarding" is doubled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope... and then it was copy pasted 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| } | ||
|
|
||
| fun ConstraintLayout.realignPercentagesToParent() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be interesting to have a comment explaining the purpose of the method? If my understanding is correct it only updates the children views according to the height but there is no mention of that in the function name. Do you think the current naming is sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great point, will do! the tl;dr is that constraint layouts within scrollviews use the total scrolling height rather than the viewport, which means percentages change size depending on how much they can scroll
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| object OpenUseCaseSelection : OnboardingViewEvents() | ||
| object OpenServerSelection : OnboardingViewEvents() | ||
| object OpenCombinedServerSelection : OnboardingViewEvents() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to use the same naming convention everywhere to be consistent? I see sometimes, we talk about combinedServer or combinedChooseServer or combinedSignUp. My vote would go for combinedSignUp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 will check in with FTUE team to see if they have a unique name for this screen (and the server selection) that avoid conflicting with the previous versions
CombinedRegister seems like a reasonable intermediate name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
801fb90 (and updates the tag)
|
|
||
| // Login or Register, depending on the signMode | ||
| data class LoginOrRegister(val username: String, val password: String, val initialDeviceName: String) : OnboardingAction | ||
| data class Register(val username: String, val password: String, val initialDeviceName: String) : OnboardingAction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Concerning the naming, I think we should stick to either register or signUp to be consistent accross the app. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% agree, would favour using register & login.
For now I'll rename the code introduced by the PR rather than renaming the entire onboarding package as it will cause a lot of noise in the diff
| error++ | ||
| } | ||
| if (state.isNumericOnlyUserIdForbidden() && login.isDigitsOnly()) { | ||
| views.createAccountInput.error = "The homeserver does not accept username with only digits." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we should declare this string into the resources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| private fun openCombinedSelectionSignUp() { | ||
| activity.addFragmentToBackstack( | ||
| views.loginFragmentContainer, | ||
| FtueAuthCombinedSignUpFragment::class.java, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need for a tag: FRAGMENT_REGISTRATION_STAGE_TAG ? I see it is used for all other registration fragments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's being used to selectively control the backstack, it's not technically needed for this screen but will add for consistency 👍
…t layout - this allows percentages to be used which make of the screen viewport rather than the accumulated scroll height
… and providing a dedicated register action
- we rely on the text size and padding instead
…ut the server selection screen
- also ports the Sso listener to a functional interface
- also adds a missing tag to the fragment adding
ac88f9a to
13fb4e5
Compare
| override fun isOnboardingSplashCarouselEnabled() = true | ||
| override fun isOnboardingUseCaseEnabled() = true | ||
| override fun isOnboardingPersonalizeEnabled() = false | ||
| override fun isOnboardingCombinedChooseServerEnabled() = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also rename the feature flag as isOnboardingCombinedRegisterEnabled(). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed 👍 aac206f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I see a last thing to rename, the boolean inside the Factory:
createBooleanFeature(
label = "FTUE Combined register",
key = DebugFeatureKeys.onboardingCombinedRegister,
factory = VectorFeatures::isOnboardingCombinedRegisterEnabled
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should have done a search replace 😅 amended the commit above ^^^ 30635af
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it intented to not rename the key DebugFeatureKeys.onboardingCombinedChooseServer? Sorry to annoy you with namings...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is my bad! third time lucky 🤞 5120e7a
aac206f to
30635af
Compare
30635af to
5120e7a
Compare
mnaturel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me to merge.
Type of change
Content
Introduces a new Sign Up screen behind a feature flag, the screen aims to simplify and merge the server selection process.
Motivation and context
To help simplify the sign up process during the FTUE (first time user experience)
Screenshots / GIFs
Tests
Tested devices