-
-
Notifications
You must be signed in to change notification settings - Fork 45
Workflow Fixes #3146
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
Workflow Fixes #3146
Conversation
📝 WalkthroughWalkthroughThe changes update the UI layout and logic for the backup code and recovery flow. In the layout XML, the default welcome back message text is removed, and a LinearLayout's ID is renamed from Sequence Diagram(s)sequenceDiagram
participant User
participant UI (PersonalIdBackupCodeFragment)
participant Parser (AddOrVerifyNameParser)
participant SessionData
User->>UI: Initiates recovery or backup code flow
UI->>UI: Calls configureUiByMode(isRecovery)
UI->>UI: Sets visibility of backupCodeLayout, confirmCodeLayout, welcomeBackLayout
UI->>Parser: Parses JSON response
Parser->>SessionData: Sets photoBase64 from "photo" field
Possibly related PRs
Suggested labels
Suggested reviewers
✨ 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 (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/res/layout/fragment_recovery_code.xml(1 hunks)app/src/org/commcare/connect/network/parser/AddOrVerifyNameParser.java(1 hunks)app/src/org/commcare/fragments/personalId/PersonalIdBackupCodeFragment.java(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/org/commcare/connect/network/parser/AddOrVerifyNameParser.java (1)
app/src/org/commcare/utils/JsonExtensions.kt (1)
optStringSafe(7-10)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Lint Code Base
🔇 Additional comments (4)
app/res/layout/fragment_recovery_code.xml (1)
78-78: LGTM! ID rename improves semantic clarity.The change from
name_layouttobackup_code_layoutmakes the LinearLayout ID more descriptive and aligns better with its purpose of containing backup code input fields.app/src/org/commcare/connect/network/parser/AddOrVerifyNameParser.java (1)
23-23: Correct mapping of photo data to appropriate property.The change from setting
tokentophotoBase64for the "photo" JSON field is logically correct and aligns with how this data is consumed inPersonalIdBackupCodeFragment.setUserNameAndPhoto()wheregetPhotoBase64()is called.app/src/org/commcare/fragments/personalId/PersonalIdBackupCodeFragment.java (2)
75-76: UI visibility logic correctly updated for renamed layout ID.The changes properly update the visibility logic to use
backupCodeLayout(renamed fromnameLayout) while maintaining the same functional behavior for recovery mode.
81-84: Consistent updates for non-recovery mode UI visibility.The visibility logic correctly uses the renamed
backupCodeLayoutand appropriately hideswelcomeBackLayoutin non-recovery mode, maintaining the intended UI behavior.
| private void configureUiByMode() { | ||
| if (isRecovery) { | ||
| titleId = R.string.connect_backup_code_title_confirm; | ||
| binding.confirmCodeLayout.setVisibility(View.GONE); | ||
| binding.recoveryCodeTilte.setText(R.string.connect_backup_code_message_title); | ||
| binding.backupCodeSubtitle.setText(R.string.connect_backup_code_message); | ||
| binding.nameLayout.setVisibility(View.VISIBLE); | ||
| binding.backupCodeLayout.setVisibility(View.VISIBLE); | ||
| binding.confirmCodeLayout.setVisibility(View.GONE); | ||
| binding.notMeButton.setVisibility(View.VISIBLE); | ||
| setUserNameAndPhoto(); | ||
| } else { | ||
| titleId = R.string.connect_backup_code_title_set; | ||
| binding.backupCodeLayout.setVisibility(View.VISIBLE); | ||
| binding.confirmCodeLayout.setVisibility(View.VISIBLE); | ||
| binding.notMeButton.setVisibility(View.GONE); | ||
| binding.nameLayout.setVisibility(View.GONE); | ||
| binding.welcomeBackLayout.setVisibility(View.GONE); | ||
| } | ||
| } |
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.
💡 Verification agent
🧩 Analysis chain
Verify all layout references have been updated consistently.
The configureUiByMode method has been updated to use the renamed layout IDs. Please ensure that no other references to the old name_layout ID exist in the codebase.
🏁 Script executed:
#!/bin/bash
# Description: Search for any remaining references to the old 'name_layout' ID
# Expected: No results should be found
echo "Searching for old 'name_layout' references..."
rg -i "name_layout" --type java --type xml
echo ""
echo "Searching for R.id.nameLayout references..."
rg "R\.id\.nameLayout" --type javaLength of output: 386
Fix remaining name_layout reference in layout file
Verification uncovered one leftover reference:
- app/res/layout/screen_personalid_name.xml:
android:id="@+id/name_layout"
Please rename this ID to the new identifier (and update any related bindings or code) so that all name_layout occurrences are removed.
🤖 Prompt for AI Agents
In app/src/org/commcare/fragments/personalId/PersonalIdBackupCodeFragment.java
lines 70 to 86, the configureUiByMode method uses updated layout IDs, but there
is still a leftover reference to the old 'name_layout' ID in the layout file
app/res/layout/screen_personalid_name.xml. To fix this, rename the
android:id="@+id/name_layout" in that XML file to the new identifier consistent
with the updated naming convention, then update any related view bindings or
code references accordingly to remove all occurrences of 'name_layout'.
|
@damagatchi retest this please |
|
@damagatchi retest this please |
Aggregating several small fixes to the workflow here