-
-
Notifications
You must be signed in to change notification settings - Fork 45
Brings back missing analytics events And Token Exceptions Handling #3075
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
📝 WalkthroughWalkthroughThis change introduces new Firebase Analytics event reporting for user actions such as forgetting a ConnectID account and clicking the login button. Analytics event names are updated, with "ccc_sign_out" renamed to "ccc_forget." The logic for obtaining HQ token authentication is refactored: the relevant method becomes an instance method and its login status check is inverted. The navigation destination change listener for analytics logging is renamed and updated throughout the codebase. Exception handling and logging in authentication building are clarified and simplified, focusing on specific exception types and removing unnecessary log statements. Sequence Diagram(s)sequenceDiagram
participant User
participant LoginActivity
participant FirebaseAnalyticsUtil
participant ConnectIDManager
User->>LoginActivity: Clicks "Forget" (ConnectID)
LoginActivity->>FirebaseAnalyticsUtil: reportCccForget()
LoginActivity->>ConnectIDManager: forgetUser()
LoginActivity->>LoginActivity: Clear password/PIN, set state, refresh UI
sequenceDiagram
participant User
participant LoginActivityUIController
participant FirebaseAnalyticsUtil
participant LoginActivity
User->>LoginActivityUIController: Clicks "Login"
LoginActivityUIController->>FirebaseAnalyticsUtil: reportLoginClicks()
LoginActivityUIController->>LoginActivity: initiateLoginAttempt()
sequenceDiagram
participant CommcareRequestGenerator
participant ConnectIDManager
CommcareRequestGenerator->>ConnectIDManager: getHqTokenIfLinked(username)
alt Manager not logged in
ConnectIDManager-->>CommcareRequestGenerator: null
else User and app record found
ConnectIDManager-->>CommcareRequestGenerator: TokenAuth
end
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
🧰 Additional context used🧬 Code Graph Analysis (4)app/src/org/commcare/activities/connect/ConnectActivity.java (1)
app/src/org/commcare/activities/LoginActivityUIController.java (1)
app/src/org/commcare/activities/LoginActivity.java (1)
app/src/org/commcare/google/services/analytics/FirebaseAnalyticsUtil.java (1)
🔇 Additional comments (14)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| notification.token.denied.title=Couldn't connect to the server. | ||
| notification.token.denied.detail=CommCare can no longer communicate with the ConnectID server. | ||
| notification.token.denied.action=Please recover your ConnectID account, then try again. | ||
| notification.token.denied.action=Please re-login into your ConnectID account, then try again. |
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.
@OrangeAndGreen Given we are moving away from recover workflow, I changed this to re-login but think there is a better word out there that I am missing here.
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 agree in the change but not sure of a better term. This is short-lived anyway I think until we can provide a better user experience for situations like this
| notification.token.denied.title=Couldn't connect to the server. | ||
| notification.token.denied.detail=CommCare can no longer communicate with the ConnectID server. | ||
| notification.token.denied.action=Please recover your ConnectID account, then try again. | ||
| notification.token.denied.action=Please re-login into your ConnectID account, then try again. |
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 agree in the change but not sure of a better term. This is short-lived anyway I think until we can provide a better user experience for situations like this
Product Description
Labels and Review