Skip to content

Conversation

@ouchadam
Copy link
Contributor

@ouchadam ouchadam commented Mar 28, 2022

Type of change

  • WIP Feature
  • Bugfix
  • Technical
  • Other :

Content

Introduces a new Sign Up screen behind a feature flag, the screen aims to simplify and merge the server selection process.

  • The feature is behind a feature flag
  • The server selection edit button is disabled and will be added back in the next PR

Motivation and context

To help simplify the sign up process during the FTUE (first time user experience)

Screenshots / GIFs

TABLET LANDSCAPE Screenshot_20220328_135650 Screenshot_20220328_135656
TABLET PORTRAIT Screenshot_20220328_135741 Screenshot_20220328_135746
PIXEL 4 XL Screenshot_20220328_134815 Screenshot_20220328_134821
SMALL Screenshot_20220328_135945 Screenshot_20220328_135949
WITH SSO WITHOUT SSO
Screenshot_20220328_132851 Screenshot_20220328_132806
GIF
after-sign-up

Tests

  • Enable the combined sign up feature
  • Create a new account with username and password or SSO

Tested devices

  • Physical
  • Emulator
  • OS version(s): 31 Sv2

@ouchadam ouchadam added the X-Needs-Design May require input from the design team label Mar 28, 2022
@github-actions
Copy link

github-actions bot commented Mar 28, 2022

Unit Test Results

110 files  ±0  110 suites  ±0   1m 12s ⏱️ -7s
195 tests ±0  195 ✔️ ±0  0 💤 ±0  0 ±0 
650 runs  ±0  650 ✔️ ±0  0 💤 ±0  0 ±0 

Results for commit 5120e7a. ± Comparison against base commit 7067c50.

♻️ This comment has been updated with latest results.

@ouchadam ouchadam requested a review from amshakal March 29, 2022 08:20
@ouchadam ouchadam force-pushed the feature/adm/enabling-personalisation branch from d1bed4b to 0ffd20e Compare March 29, 2022 16:48
Base automatically changed from feature/adm/enabling-personalisation to develop March 30, 2022 08:09
@ouchadam ouchadam force-pushed the feature/adm/ftue-sign-up branch from 62044f3 to fcb7c73 Compare March 30, 2022 08:16
Copy link
Member

@amshakal amshakal left a 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!

@ouchadam ouchadam force-pushed the feature/adm/ftue-sign-up branch from fcb7c73 to 9c044fb Compare March 30, 2022 12:52
@ouchadam ouchadam marked this pull request as ready for review March 30, 2022 12:54
@ouchadam ouchadam requested review from a team and mnaturel and removed request for a team March 30, 2022 12:56
@ouchadam ouchadam removed the X-Needs-Design May require input from the design team label Mar 31, 2022
Copy link
Contributor

@mnaturel mnaturel left a 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")
Copy link
Contributor

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?

Copy link
Contributor Author

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 🤦

Copy link
Contributor Author

Choose a reason for hiding this comment

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

}
}

fun ConstraintLayout.realignPercentagesToParent() {
Copy link
Contributor

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?

Copy link
Contributor Author

@ouchadam ouchadam Mar 31, 2022

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

Copy link
Contributor Author

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()
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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
Copy link
Contributor

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?

Copy link
Contributor Author

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."
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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,
Copy link
Contributor

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.

Copy link
Contributor Author

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 👍

@ouchadam ouchadam force-pushed the feature/adm/ftue-sign-up branch from ac88f9a to 13fb4e5 Compare March 31, 2022 17:07
override fun isOnboardingSplashCarouselEnabled() = true
override fun isOnboardingUseCaseEnabled() = true
override fun isOnboardingPersonalizeEnabled() = false
override fun isOnboardingCombinedChooseServerEnabled() = false
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed 👍 aac206f

Copy link
Contributor

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
)

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 should have done a search replace 😅 amended the commit above ^^^ 30635af

Copy link
Contributor

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...

Copy link
Contributor Author

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

@ouchadam ouchadam force-pushed the feature/adm/ftue-sign-up branch from aac206f to 30635af Compare April 1, 2022 09:48
@ouchadam ouchadam force-pushed the feature/adm/ftue-sign-up branch from 30635af to 5120e7a Compare April 1, 2022 12:13
Copy link
Contributor

@mnaturel mnaturel left a 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.

@ouchadam ouchadam merged commit 27b727e into develop Apr 1, 2022
@ouchadam ouchadam deleted the feature/adm/ftue-sign-up branch April 1, 2022 12:51
@ouchadam ouchadam added the Z-FTUE Issue is relevant to the first time use project or experience label Apr 1, 2022
@ouchadam ouchadam changed the title FTUE - Combined sign up + server selection screen FTUE - Combined registration Apr 5, 2022
@ouchadam ouchadam mentioned this pull request Apr 5, 2022
6 tasks
@ouchadam ouchadam mentioned this pull request May 9, 2022
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Z-FTUE Issue is relevant to the first time use project or experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants