-
Notifications
You must be signed in to change notification settings - Fork 868
FTUE - Sign up analytics #6042
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
Merged
Merged
FTUE - Sign up analytics #6042
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9110fe8
lifting unavailable homeserver rendering to the activity/ftuevariant
ouchadam e89f9ea
providing the full SSOProvider instead of selection instead of just t…
ouchadam ac89495
chaining the current authentication type into the onboarding state
ouchadam 2805048
passing the authentication state from the onboarding and tracking sig…
ouchadam 1576516
adding changelog entry
ouchadam 70c3530
aligning the with develop to use the initial state for reading the ac…
ouchadam 8d3c70f
removing unused imports
ouchadam d002ab6
removing unused imports
ouchadam 5d0d177
including null case in the authentication when
ouchadam 6fcbd24
reverting instance check, no longer needed as the event no longer con…
ouchadam 4993077
handling the legacy onboarding complete navigation by inferring the a…
ouchadam 06e67a3
correctly casing github/gitlab
ouchadam db3cb42
renaming getter to imply the function does more than simply get a value
ouchadam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| FTUE - Adds Sign Up tracking |
31 changes: 31 additions & 0 deletions
31
vector/src/main/java/im/vector/app/features/analytics/extensions/SignUpExt.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Copyright (c) 2022 New Vector Ltd | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package im.vector.app.features.analytics.extensions | ||
|
|
||
| import im.vector.app.features.analytics.plan.Signup | ||
| import im.vector.app.features.onboarding.AuthenticationDescription | ||
|
|
||
| fun AuthenticationDescription.AuthenticationType.toAnalyticsType() = when (this) { | ||
| AuthenticationDescription.AuthenticationType.Password -> Signup.AuthenticationType.Password | ||
| AuthenticationDescription.AuthenticationType.Apple -> Signup.AuthenticationType.Apple | ||
| AuthenticationDescription.AuthenticationType.Facebook -> Signup.AuthenticationType.Facebook | ||
| AuthenticationDescription.AuthenticationType.GitHub -> Signup.AuthenticationType.GitHub | ||
| AuthenticationDescription.AuthenticationType.GitLab -> Signup.AuthenticationType.GitLab | ||
| AuthenticationDescription.AuthenticationType.Google -> Signup.AuthenticationType.Google | ||
| AuthenticationDescription.AuthenticationType.SSO -> Signup.AuthenticationType.SSO | ||
| AuthenticationDescription.AuthenticationType.Other -> Signup.AuthenticationType.Other | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
vector/src/main/java/im/vector/app/features/onboarding/AuthenticationDescription.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| /* | ||
| * Copyright (c) 2022 New Vector Ltd | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package im.vector.app.features.onboarding | ||
|
|
||
| import android.os.Parcelable | ||
| import im.vector.app.features.onboarding.AuthenticationDescription.AuthenticationType | ||
| import kotlinx.parcelize.Parcelize | ||
| import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider | ||
|
|
||
| sealed interface AuthenticationDescription : Parcelable { | ||
| @Parcelize | ||
| object Login : AuthenticationDescription | ||
|
|
||
| @Parcelize | ||
| data class Register(val type: AuthenticationType) : AuthenticationDescription | ||
|
|
||
| enum class AuthenticationType { | ||
| Password, | ||
| Apple, | ||
| Facebook, | ||
| GitHub, | ||
| GitLab, | ||
| Google, | ||
| SSO, | ||
| Other | ||
| } | ||
| } | ||
|
|
||
| fun SsoIdentityProvider?.toAuthenticationType() = when (this?.brand) { | ||
| SsoIdentityProvider.BRAND_GOOGLE -> AuthenticationType.Google | ||
| SsoIdentityProvider.BRAND_GITHUB -> AuthenticationType.GitHub | ||
| SsoIdentityProvider.BRAND_APPLE -> AuthenticationType.Apple | ||
| SsoIdentityProvider.BRAND_FACEBOOK -> AuthenticationType.Facebook | ||
| SsoIdentityProvider.BRAND_GITLAB -> AuthenticationType.GitLab | ||
| SsoIdentityProvider.BRAND_TWITTER -> AuthenticationType.SSO | ||
| null -> AuthenticationType.SSO | ||
| else -> AuthenticationType.SSO | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 need to know the
SsoIdentityProviderin order to provide a tracking value (only used by the FTUE classes)