-
-
Notifications
You must be signed in to change notification settings - Fork 45
Review for layouts, navigations, views, and some minor strings #3093
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 update introduces a large set of new and modified Android UI layout XML files and custom view classes, primarily for a "Connect" feature suite. It adds new layouts for messaging, delivery, job progress, payments, learning modules, and various dialogs and fragments, as well as navigation graph XMLs for structured navigation within these features. Several custom UI components are implemented in Java, including Sequence Diagram(s)sequenceDiagram
participant User
participant MainActivity
participant NavHostFragment
participant ConnectJobsListsFragment
participant ConnectJobIntroFragment
participant ConnectLearningProgressFragment
participant ConnectDeliveryDetailsFragment
participant ConnectDeliveryProgressFragment
participant ConnectResultsListFragment
participant ConnectDeliveryListFragment
User->>MainActivity: Launch app
MainActivity->>NavHostFragment: Display Connect feature (nav_graph_connect)
NavHostFragment->>ConnectJobsListsFragment: Show job list
User->>ConnectJobsListsFragment: Select job
ConnectJobsListsFragment->>ConnectJobIntroFragment: Navigate to job intro
User->>ConnectJobIntroFragment: Start learning
ConnectJobIntroFragment->>ConnectLearningProgressFragment: Show learning progress
User->>ConnectLearningProgressFragment: Complete learning
ConnectLearningProgressFragment->>ConnectDeliveryDetailsFragment: Show delivery details
User->>ConnectDeliveryDetailsFragment: Start delivery
ConnectDeliveryDetailsFragment->>ConnectDeliveryProgressFragment: Show delivery progress
User->>ConnectDeliveryProgressFragment: View results
ConnectDeliveryProgressFragment->>ConnectResultsListFragment: Show results
User->>ConnectResultsListFragment: View delivery list
ConnectResultsListFragment->>ConnectDeliveryListFragment: Show delivery list
sequenceDiagram
participant User
participant MessagingActivity
participant NavHostFragment
participant ChannelListFragment
participant ChannelConsentDialog
participant ConnectMessageFragment
User->>MessagingActivity: Open Connect Messaging
MessagingActivity->>NavHostFragment: Load nav_graph_connect_messaging
NavHostFragment->>ChannelListFragment: Show channel list
User->>ChannelListFragment: Select channel
ChannelListFragment->>ChannelConsentDialog: Show consent dialog
User->>ChannelConsentDialog: Accept consent
ChannelConsentDialog->>ConnectMessageFragment: Navigate to message fragment
User->>ConnectMessageFragment: Send/Receive messages
Possibly related PRs
Suggested labels
Suggested reviewers
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. ✨ 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: 57
🔭 Outside diff range comments (2)
app/res/values-es/strings.xml (1)
1-1:⚠️ Potential issueRemove BOM character from XML declaration.
The file begins with a Byte Order Mark (BOM) before the
<?xml…?>declaration, which can cause parsing issues on some Android build tools. Please remove the BOM to ensure consistent file encoding.app/res/layout/home_screen.xml (1)
11-30:⚠️ Potential issueIncorrect ConstraintLayout attributes in LinearLayout
connect_alert_tileis inside aLinearLayout, soapp:layout_constraintStart_toStartOf="parent"is ignored. Remove any constraint attributes or move this CardView into aConstraintLayoutif you need constraints.
♻️ Duplicate comments (1)
app/src/org/commcare/views/connect/ConnectEditText.java (1)
225-233: Mixeddouble→intconversion indpToPxjeopardises small dimensions
Math.round()or returningfloat(as suggested for the other class) preserves sub-pixel accuracy until assignment.
🧹 Nitpick comments (86)
app/res/values-ti/strings.xml (1)
1-577: New Tigrinya localization added: review completeness and encoding
The comprehensive Tigrinya translations cover all UI strings, including the new Connect feature. Please verify that every new key—and especially those with placeholders or quotes—is correctly translated and escaped. Optionally, addtools:locale="ti"on the<resources>tag to enable Android Studio previews for this locale.app/res/layout/fragment_connect_unlock.xml (1)
1-6: Empty layout resource for Connect Unlock fragment
This newConstraintLayoutserves as a container for the Connect Unlock UI. For better tooling support, consider adding atools:context="org.commcare.ConnectUnlockFragment"attribute (or appropriate Fragment class) to aid layout previews in Android Studio.app/res/layout/fragment_connect_results_list.xml (2)
2-5: Consider simplifying layout hierarchy.Using a
ConstraintLayoutwith a single full-screenRecyclerViewadds unnecessary nesting and overhead. You can replace the rootConstraintLayoutwith theRecyclerViewdirectly, or use a simpler container (e.g.,FrameLayout) if you plan to add other views later.
7-13: Use match-constraint for better compatibility.When using
ConstraintLayout, prefer0dpforlayout_widthandlayout_height(match-constraint) and constrain all sides (start,end,top,bottom) instead ofmatch_parent. This avoids layout warnings and ensures proper behavior if you add new constraints later.app/res/layout/fragment_channel_list.xml (2)
1-7: Simplify single-child ConstraintLayout.As with other fragment layouts, this
ConstraintLayoutonly hosts a full-screenRecyclerView. Consider using theRecyclerViewas the root element or a simpler container (e.g.,FrameLayout) to reduce nesting and improve rendering performance.
9-14: Enforce resource ID naming conventions.Resource IDs should use lowercase snake_case. Rename
@+id/rvChannel(camelCase) to something like@+id/rv_channel_listfor consistency across the codebase.app/res/layout/view_country_code_edittext.xml (1)
24-32: Externalize hardcoded hint and standardize IDs.Move the hardcoded hint
"00000000"intostrings.xml(e.g.,@string/country_code_hint). Also, resource IDs should follow lowercase snake_case, e.g., renameetPhoneNumberto@+id/edit_text_phone_number.app/res/layout/activity_connect_messaging.xml (1)
5-8: Avoid overly generic IDs.The root layout uses
android:id="@+id/main", which is too generic and may collide with other IDs. Consider a more descriptive name like@+id/activity_connect_messaging_rootor remove the ID if it’s unused.app/res/layout/screen_connect.xml (1)
1-6: Add preview metadata and enforce RTL-friendly constraints
- Consider adding
tools:context="…Activity"(or your hosting Activity) at the root to enable full-screen previews in Android Studio.- Replace
layout_constraintLeft_toLeftOf/Right_toRightOfwithlayout_constraintStart_toStartOf/End_toEndOffor proper RTL support.Also applies to: 13-14
app/res/layout/fragment_connect_downloading.xml (3)
8-16: Flatten layout and externalize dimensions
Nesting aLinearLayoutinside aConstraintLayoutincreases view-hierarchy depth. You can center children directly usingConstraintLayoutconstraints. Also, extract hard-coded values like100dp,20dp, and200dpintores/values/dimens.xmlto maintain consistency.
25-31: Improve layout preview withtools:text
The titleTextViewcurrently has no text set at design time. Adding atools:text="Downloading…"(or similar) will make it easier to preview the UI in Android Studio without affecting runtime.
41-48: Prefergoneoverinvisiblewhen hiding views
android:visibility="invisible"reserves the view’s space even when hidden. If you intend to collapse it completely until it’s ready, useandroid:visibility="gone".app/res/layout/item_login_connect_home_corrupt_apps.xml (2)
8-10: Extract margin values todimenresources
Hard-coded margins (16dp,8dp) should live inres/values/dimens.xmlto ensure design consistency and ease future updates.
27-35: Addtools:textfor dynamic title preview
ThetvTitleTextViewhas no default text; adding atools:text="Corrupt App Detected"(or similar) will make the layout easier to inspect in the IDE without affecting runtime behavior.app/res/layout/connect_delivery_item.xml (4)
9-16: Simplify the status icon container
You can reduce the view hierarchy by applying the background shape directly to the ImageView (or wrapping it in a MaterialCardView) instead of using a separateLinearLayout.
27-37: Add preview text via tools:text
There’s noandroid:textset here (it’s probably populated at runtime). For better layout previews, add e.g.tools:text="@string/sample_delivery_item_name"
40-53: Add preview text and ensure dynamic binding
Similarly,delivery_item_reasonhas noandroid:text. Usetools:textfor previews to catch layout issues early.
55-62: Add preview text for date field
delivery_item_dateis empty at design time; includetools:text="@string/sample_date"for accurate preview.app/res/layout/fragment_channel_consent_bottom_sheet.xml (4)
39-47: Use tools:text instead of hard-coded placeholder
channel_namecurrently usesandroid:text="(channel name)". Replace withtools:text="Sample Channel"to avoid shipping placeholder text to end users.
57-64: Replace RelativeLayout with ConstraintLayout
You don’t need aRelativeLayout; aConstraintLayoutcan simplify alignment (and remove deprecatedfill_parent). Migrating will make constraints explicit and reduce nested layouts.
62-74: Use start/end instead of left/right
Replacelayout_alignParentLeftwithlayout_alignParentStarton the decline button for proper RTL support.
75-87: Use start/end instead of right/left
Similarly, changelayout_alignParentRighton the accept button tolayout_alignParentEnd.app/res/layout/view_job_card.xml (3)
20-26: Use tools:text, not android:text, for dynamic content
tv_job_titlehas hard-coded text. If this is set at runtime, switch totools:text="Job Title Here"so you don’t ship placeholder strings.
28-38: Use tools:text for description as well
tv_job_descriptionis also dynamic. Replaceandroid:text="Check vaccine status"with atools:textattribute.
54-65: Inconsistent ID naming and redundant visibility attributes
tvDailyVisitTitlebreaks snake_case convention and redundantly sets bothandroid:visibilityandtools:visibility. Rename totv_daily_visit_titleand remove the extra visibility attribute.app/res/layout/home_screen.xml (2)
84-88: Use match_parent and fillViewPort for scrollable content
ANestedScrollViewwithwrap_contentheight can cause measurement issues. Consider usingmatch_parentandandroid:fillViewport="true"to ensure proper scrolling behavior.
88-92: Remove unsupported orientation on RelativeLayout
android:orientationhas no effect onRelativeLayout. Either switch toLinearLayout(if you need orientation) or remove this attribute.app/res/layout/item_progress_job_summary_visit.xml (2)
9-18: Add preview text for primary visit title
Includetools:text="Primary Visit"so you can visualize this item in the layout editor.
20-29: Add preview text for visit count
Usetools:text="2/2"ontv_primary_visit_countfor accurate previewing during design.app/res/layout/connect_verification_item.xml (3)
3-7: Avoid hard-coded padding without namespace grouping
Allxmlns:declarations should appear together for readability. Consider movingxmlns:appalongsidexmlns:androidat the top of the root tag.
9-17: Use wrap_content or match_constraints instead of fixed dp width
Settingandroid:layout_width="120dp"ondelivery_item_namemay truncate long names on small devices. Consider usingwrap_contentor0dpwithconstraintEnd_toStartOfplusapp:layout_constraintWidth_percentfor responsive layouts.
19-27: Missing end constraint ondelivery_item_date
Thedelivery_item_dateview has only astartconstraint. While wrap_content width handles horizontal size, you may want to explicitly constrain its end (e.g.,app:layout_constraintEnd_toEndOf="parent") to prevent unpredictable placement in RTL layouts.app/res/layout/view_progress_job_card.xml (1)
102-107: Unused guideline and non-descriptive ID
TheGuidelinewith idguideline3isn’t referenced by any view. Remove it or rename to a descriptive name and apply it, or drop it if not needed.app/res/layout/item_channel.xml (1)
2-9: Remove irrelevantorientationand margin defaults
ConstraintLayoutignoresandroid:orientation. Alsoandroid:layout_margin="0dp"is redundant when 0. Remove these for clarity.app/res/layout/fragment_connect_message.xml (1)
14-21: Remove invalidorientationattribute
android:orientation="vertical"onRecyclerViewhas no effect and can be removed.app/res/layout/fragment_connect_job_intro.xml (3)
2-7: Consider adding fillViewport for ScrollView
To ensure the content expands to fill the screen viewport even when the child content is smaller, add:android:fillViewport="true"to the
<ScrollView>element for consistent scrolling behavior.
21-28: Use start/end and CardView background attribute
For proper RTL support and to leverage CardView styling, replace:- android:layout_marginLeft="16dp" - android:layout_marginRight="16dp" - android:backgroundTint="@color/connect_blue_color" + android:layout_marginStart="16dp" + android:layout_marginEnd="16dp" + app:cardBackgroundColor="@color/connect_blue_color"
102-112: Migrate to MaterialButton icon API
android:drawableRightandandroid:backgroundTintare deprecated onMaterialButton. Use the icon API instead:- android:drawableRight="@drawable/ic_connect_arrow_forward_20px" - android:backgroundTint="@color/white" + app:icon="@drawable/ic_connect_arrow_forward_20px" + app:iconGravity="textEnd" + app:backgroundTint="@color/white"This change simplifies styling and ensures theming consistency.
app/res/navigation/nav_graph_connect_messaging.xml (1)
9-11: Use string resources for labels
Hard-coded labels hinder localization. Replace:android:label="fragment_connect_messaging_consent_fragment"with a reference to a string resource, e.g.:
android:label="@string/connect_messaging_consent_title"app/res/layout/fragment_connect_results_summary_list.xml (1)
10-14: Remove redundant orientation on RelativeLayout
android:orientationhas no effect on aRelativeLayout. Please remove:android:orientation="vertical"to clean up unused attributes.
app/res/layout-land/home_screen.xml (3)
94-96: Consider changing NestedScrollView height to match_parent
Usingwrap_contentmay not allow the scroll container to fill available space in landscape. For consistent scrolling, consider:- android:layout_height="wrap_content" + android:layout_height="match_parent"
101-101: Remove redundant orientation on RelativeLayout
android:orientationis not applicable toRelativeLayout. Please remove this attribute:android:orientation="vertical"
107-110: Avoid negative margins for positioning
Usingandroid:layout_marginTop="-35dp"is fragile. Consider restructuring the layout—e.g., with aConstraintLayout—so that you can position views without negative margins.app/res/layout/fragment_connect_delivery_list.xml (2)
17-24: Consistent ID naming for filter bar CardView
IDs likellFilterByStatusimply a LinearLayout (ll) but areCardViewelements. Rename to a more descriptive prefix, e.g.,cvFilterByStatus, to match the view type and improve readability. Also make it interactive by addingclickable/focusablefor accessibility.Example:
- <androidx.cardview.widget.CardView - android:id="@+id/llFilterByStatus" + <androidx.cardview.widget.CardView + android:id="@+id/cvFilterByStatus" + android:clickable="true" + android:focusable="true"
26-29: Avoid unsupportedlayout_marginVerticalattribute
android:layout_marginVertical="15dp"(Line 28) may not be honored on all API levels. Replace with explicit top and bottom margins for consistency:- android:layout_marginVertical="15dp" + android:layout_marginTop="15dp" + android:layout_marginBottom="15dp"app/res/layout/fragment_connect_learning_progress.xml (5)
55-60: Remove ignored ConstraintLayout attributes inLinearLayout
Attributes likeapp:layout_constraintStart_toStartOfandapp:layout_constraintTop_toTopOf(Lines 58–59) apply only to children ofConstraintLayout. They have no effect inside thisLinearLayout—remove them to avoid confusion.
63-67: Replace deprecatedfill_parentwithmatch_parent
android:layout_width="fill_parent"(Line 65) is deprecated. Usematch_parentinstead:- android:layout_width="fill_parent" + android:layout_width="match_parent"
142-150: Useapp:cardBackgroundColorfor CardView background
TheCardView(Line 148) setsandroid:background, which bypasses CardView’s corner radius and elevation. Replace withapp:cardBackgroundColor:- android:background="@color/connect_blue_color_10" + app:cardBackgroundColor="@color/connect_blue_color_10"
197-202: Remove invalid ConstraintLayout constraints on CardView
TheCardViewwith idconnect_learning_certificate_containeris inside aLinearLayoutyet hasapp:layout_constraint*attributes (Lines 199–201) that will be ignored. Delete them to keep the layout clean:- app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent"
100-108: Opt to use customCircleProgressBarfor consistency
The<ProgressBar>(Lines 100–108) does not leverage the customCircleProgressBarused elsewhere in the Connect feature. Consider replacing it to maintain a unified look:- <ProgressBar + <org.commcare.views.connect.CircleProgressBar android:id="@+id/connect_learning_progress_bar" android:layout_width="200dp" android:layout_height="200dp" ...app/res/layout/item_login_connect_home_apps.xml (3)
14-20: Remove unsupported shadow attributes onCardView
Attributesandroid:shadowColor,android:shadowDx,android:shadowDy, andandroid:shadowRadius(Lines 14–17) are not supported byCardViewand will be ignored. Rely onapp:cardElevationor a custom drawable for shadows instead.
33-36: Usetools:textfor preview instead of emptyandroid:text
android:text=""yields no preview in the layout editor. Replace with atools:textsample:<TextView ... android:text="" tools:text="@string/sample_job_title" />
96-102: Provide design-time date placeholder withtools:text
TheTextViewwith id@id/tvDatehas no text, making it blank in previews. Add:<TextView ... android:text="" tools:text="May 15, 2025" />app/res/layout/item_chat_left_view.xml (3)
2-6: Remove ineffectivelayout_gravityon rootConstraintLayout
android:layout_gravity="start"(Line 6) has no effect on the root view. Remove it for clarity.
34-41: Usetools:textfor placeholder chat message
TheTextViewtvChatMessage(Line 38) ships with dummy text. Replace withtools:textand clearandroid:text:- android:text="Some dummy text message from user A" + android:text="" + tools:text="Hi there! Are you free tomorrow?"
42-51: Usetools:textfor placeholder timestamp and rename for clarity
The timestampTextView(Line 48) usesandroid:text="11:00 AM". Change to:- android:text="11:00 AM" + android:text="" + tools:text="11:00 AM"Optionally rename
@+id/tvUserNameto@+id/tvTimestampto reflect its purpose.app/res/layout/connect_delivery_progress_item.xml (2)
11-17: Remove unsupported shadow attributes onCardView
Lines 11–17 (android:shadowColor,android:shadowDx,android:shadowDy,android:shadowRadius) are ignored byCardView. Useapp:cardElevation="10dp"for shadow.
34-47: Consider flattening nestedLinearLayouts withConstraintLayout
Multiple nestedLinearLayouts inflate the view hierarchy. You can simplify and improve performance using a singleConstraintLayout:<androidx.constraintlayout.widget.ConstraintLayout ...> <!-- Icon and approved count aligned within one layout --> </androidx.constraintlayout.widget.ConstraintLayout>app/res/layout/fragment_connect_progress_delivery.xml (3)
40-51: Remove constraint layout attributes from TextView in LinearLayout.The TextView has
app:layout_constraintStart_toStartOfandapp:layout_constraintTop_toTopOfattributes which are only applicable in ConstraintLayout but are being used within a LinearLayout where they have no effect.<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginStart="16dp" android:text="@string/connect_progress_title" android:textColor="@color/black" android:textSize="16sp" android:textStyle="bold" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" />
116-122: Add ID attribute to TextView for easier reference in code.This TextView for the "complete" status doesn't have an ID attribute, which will make it difficult to access and modify programmatically.
<TextView + android:id="@+id/connect_progress_complete_text" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/connect_learn_complete" android:textColor="@color/white" android:visibility="gone" android:textStyle="bold"/>
165-166: Replace drawableRight with drawableEnd for RTL support.Using
drawableRightis deprecated as it doesn't properly support right-to-left (RTL) layouts. Replace it withdrawableEndfor better internationalization support.- android:drawableRight= "@drawable/ic_connect_directory_sync" + android:drawableEnd="@drawable/ic_connect_directory_sync" android:drawablePadding="5dp" />app/res/layout/fragment_connect_job_detail_bottom_sheet_dialog.xml (2)
49-55: Move paddingBottom from CardView to inner layout.CardView doesn't directly apply padding to its content. The padding should be moved to the inner ConstraintLayout for proper effect.
<androidx.cardview.widget.CardView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="16dp" - android:paddingBottom="20dp" app:cardCornerRadius="10dp" app:cardElevation="5dp">
66-69: Redundant title text.The same string resource
@string/connect_job_info_delivery_detailis used for both the main title (line 33) and this inner title. Consider using different, more specific string resources to differentiate these elements.<TextView android:id="@+id/connect_delivery_title" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/connect_job_info_delivery_detail" + android:text="@string/connect_delivery_details_title" android:textColor="@color/white" android:textSize="16sp" android:textStyle="bold" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />app/src/org/commcare/views/connect/LinearProgressBar.java (2)
21-21: Unused stroke width property.There's a field and setter for stroke width, but it's not used in the drawing logic as noted in the comment. Remove unused code to avoid confusion.
- private float strokeWidth = 10f; - public void setStrokeWidth(float width) { - this.strokeWidth = width; - // Not applicable for a linear bar, but can be implemented if necessary - invalidate(); - }Also applies to: 84-88
90-96: Remove debug logging from production code.The
Log.estatement insetProgressColoruses the error log level for what appears to be debug information. Error logs should be reserved for actual errors.public void setProgressColor(int color) { - Log.e("LinearProgressBar", "Setting progress color to: " + color); this.progressColor = color; this.isGradient = false; progressPaint.setColor(color); invalidate(); }app/res/layout/connect_payment_item.xml (4)
46-54: Remove constraint attributes from ImageView in LinearLayout.This ImageView has
app:layout_constraint*attributes but is inside a LinearLayout where they have no effect. Remove these to improve clarity and performance.<ImageView android:id="@+id/imgReceived" android:layout_width="15dp" android:layout_height="15dp" android:layout_marginEnd="10dp" android:contentDescription="@null" android:src="@drawable/ic_connect_payment_received_check" - app:layout_constraintBottom_toBottomOf="@+id/name" - app:layout_constraintStart_toEndOf="@+id/name" - app:layout_constraintTop_toTopOf="@+id/name" />
65-74: Remove constraint attributes from ImageView in LinearLayout.Similar to the previous issue, this ImageView also has constraint attributes within a LinearLayout where they don't apply.
<ImageView android:id="@+id/imgYellowDot" android:layout_width="7dp" android:layout_height="7dp" android:layout_marginStart="6dp" android:layout_marginEnd="6dp" android:contentDescription="@null" android:src="@drawable/ic_connect_yellow_dot" - app:layout_constraintBottom_toBottomOf="@+id/name" - app:layout_constraintStart_toEndOf="@+id/name" - app:layout_constraintTop_toTopOf="@+id/name" />
92-92: Remove ineffective layout_weight attribute from CardView.The CardView has
android:layout_weight="1"but it's not inside a weighted container like LinearLayout with horizontal/vertical orientation, so this property has no effect.<androidx.cardview.widget.CardView android:id="@+id/confirm" android:layout_width="wrap_content" android:layout_height="30dp" android:layout_marginTop="10dp" android:layout_marginEnd="20dp" - android:layout_weight="1" app:cardCornerRadius="20dp" app:cardElevation="0dp" app:layout_constraintBottom_toBottomOf="@+id/name" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/name">
147-157: Add ID to TextView in revert payment section.This TextView doesn't have an ID attribute, which will make it difficult to access and modify programmatically.
<TextView + android:id="@+id/tv_revert_payment" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/connect_payment_revert" android:textColor="@color/connect_red" android:textSize="14sp" android:textStyle="bold" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/name" tools:text="@string/connect_payment_revert" />app/res/layout/screen_login.xml (2)
134-143: Improve accessibility by using dimension resources.The input field now has hardcoded values for padding (15dp), height (50dp), and text size (18sp). Consider using dimension resources for these values to improve maintainability and support for different screen sizes and accessibility requirements.
- android:paddingLeft="15dp" - android:layout_height="50dp" - android:textSize="18sp" + android:paddingLeft="@dimen/edit_text_padding" + android:layout_height="@dimen/input_field_height" + android:textSize="@dimen/input_text_size"
152-155: Enhance accessibility for password field wrapper.Similar to the username field, consider using dimension resources for the password field wrapper's height and margins.
- android:layout_height="50dp" - android:padding="0dp" - android:layout_marginTop="15dp" + android:layout_height="@dimen/input_field_height" + android:padding="0dp" + android:layout_marginTop="@dimen/field_vertical_spacing"app/res/layout/fragment_connect_delivery_progress.xml (2)
6-6: Replace hardcoded color with resource.The background color is hardcoded as "#e1e0e0". Consider using a color resource for better maintainability.
- android:background="#e1e0e0" + android:background="@color/connect_light_gray_background"
17-18: Replace hardcoded color with resource.The background color is hardcoded as "#fff". Consider using the standard color resource.
- android:background="#fff" + android:background="@color/white"app/src/org/commcare/views/connect/CircleProgressBar.java (2)
1-110: Consider adding XML attributes support.The custom view would benefit from supporting custom XML attributes so it can be fully configured in layout files.
Consider adding:
- Custom attributes in
attrs.xml:<declare-styleable name="CircleProgressBar"> <attr name="progressColor" format="color" /> <attr name="progressBackgroundColor" format="color" /> <attr name="progressStrokeWidth" format="dimension" /> <attr name="initialProgress" format="float" /> </declare-styleable>
- Reading these attributes in your constructor:
public CircleProgressBar(Context context, AttributeSet attrs) { super(context, attrs); TypedArray a = context.getTheme().obtainStyledAttributes( attrs, R.styleable.CircleProgressBar, 0, 0); try { progressColor = a.getColor(R.styleable.CircleProgressBar_progressColor, Color.BLUE); backgroundColor = a.getColor(R.styleable.CircleProgressBar_progressBackgroundColor, Color.LTGRAY); strokeWidth = a.getDimension(R.styleable.CircleProgressBar_progressStrokeWidth, 10f); progress = a.getFloat(R.styleable.CircleProgressBar_initialProgress, 0f); } finally { a.recycle(); } init(); }
79-82: Consider adding animation support.The progress updates would be more visually appealing with smooth animations.
You could implement this by:
- Adding a ValueAnimator to animate between the current and target progress values
- Using ObjectAnimator.ofFloat(this, "progress", currentProgress, targetProgress)
This would make progress changes more user-friendly and visually appealing.
app/res/layout/item_chat_right_view.xml (3)
37-43: Hard-coded placeholder message should be removed before shippingThe layout still contains
"Some dummy text message from user A". Leaving literal text violates localisation and QA checklists and can accidentally ship to production.
52-58: Timestamp placeholder must be externalised to a string resource or set programmatically
"12:00 AM"is likewise a hard-coded demo value. Externalise or bind the real timestamp via adapter to avoid stale UI.
28-35: Inefficient nested layoutYou are nesting
LinearLayoutinside aRelativeLayoutinside aConstraintLayout. SinceConstraintLayoutcan express the required constraints itself, consider flattening one level (e.g. makeLinearLayoutthe direct child ofConstraintLayout). This reduces measure-layout passes and improves scroll performance in chat lists.app/src/org/commcare/views/ConnectPhoneInputView.java (3)
108-110:dpToPxloses precision; returnfloator apply rounding laterCasting to
inthere truncates fractions, so thin borders (e.g. 0.5 dp hairlines) collapse to 0 px on mdpi devices. Recommend returningfloatand casting only when setting dimensions.- private int dpToPx(int dp) { - return (int) (dp * getResources().getDisplayMetrics().density); + private int dpToPx(int dp) { + return Math.round(dp * getResources().getDisplayMetrics().density); }
116-124: Expose a way to remove the attachedTextWatcher
setOnEditTextChangedListeneronly adds watchers; callers cannot later detach them, which can leak activities/fragments. Provide a correspondingremoveOnEditTextChangedListeneror return the created watcher instance.
89-99: Repeated calls tosetLayoutParamsinsideinit()may cause unnecessary layout passesSetting width and margins separately followed by
setLayoutParams()twice costs extra. Build theLayoutParams, set fields, then assign once.app/res/navigation/nav_graph_connect.xml (1)
161-165: Inconsistent label for bottom sheet dialog.
All fragments usefragment_*prefix in their labels. The dialog currently uses the class name:android:label="ConnectJobDetailBottomSheetDialogFragment"For consistency, consider:
- android:label="ConnectJobDetailBottomSheetDialogFragment" + android:label="fragment_connect_job_detail_bottom_sheet_dialog"app/res/values-fr/strings.xml (2)
79-79: Inconsistent ellipsis spacing.
This string uses a space before the ellipsis (" …"), while others do not. For consistency, tighten the punctuation:- <string name="loading_form">Chargement du formulaire …</string> + <string name="loading_form">Chargement du formulaire…</string>
120-120: Inconsistent capitalization.
“Formulaire” is capitalized here but lowercase elsewhere. Align with other entries:- <string name="saving_form">Sauvegarde du Formulaire …</string> + <string name="saving_form">Sauvegarde du formulaire…</string>app/res/values-pt/strings.xml (2)
14-27: Empty support email placeholder.
<string name="support_email_address_default"></string>is empty. If intentional, consider documenting why—or provide a sensible default or comment.
246-246: Use single-character ellipsis.
Portuguese strings generally use the three-dot sequence; consider switching to the single-character ellipsis (…) for consistency:- <string name="finding_location">Encontrando localização...</string> + <string name="finding_location">Encontrando localização…</string>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (55)
app/res/layout-land/home_screen.xml(3 hunks)app/res/layout/activity_connect_messaging.xml(1 hunks)app/res/layout/connect_delivery_item.xml(1 hunks)app/res/layout/connect_delivery_progress_item.xml(1 hunks)app/res/layout/connect_payment_item.xml(1 hunks)app/res/layout/connect_verification_item.xml(1 hunks)app/res/layout/dialog_payment_confirmation.xml(1 hunks)app/res/layout/fragment_channel_consent_bottom_sheet.xml(1 hunks)app/res/layout/fragment_channel_list.xml(1 hunks)app/res/layout/fragment_connect_delivery_details.xml(1 hunks)app/res/layout/fragment_connect_delivery_list.xml(1 hunks)app/res/layout/fragment_connect_delivery_progress.xml(1 hunks)app/res/layout/fragment_connect_downloading.xml(1 hunks)app/res/layout/fragment_connect_job_detail_bottom_sheet_dialog.xml(1 hunks)app/res/layout/fragment_connect_job_intro.xml(1 hunks)app/res/layout/fragment_connect_jobs_list.xml(1 hunks)app/res/layout/fragment_connect_learning_progress.xml(1 hunks)app/res/layout/fragment_connect_message.xml(1 hunks)app/res/layout/fragment_connect_progress_delivery.xml(1 hunks)app/res/layout/fragment_connect_results_list.xml(1 hunks)app/res/layout/fragment_connect_results_summary_list.xml(1 hunks)app/res/layout/fragment_connect_unlock.xml(1 hunks)app/res/layout/fragment_recovery_code.xml(2 hunks)app/res/layout/grid_header_top_banner.xml(0 hunks)app/res/layout/home_screen.xml(2 hunks)app/res/layout/item_channel.xml(1 hunks)app/res/layout/item_chat_left_view.xml(1 hunks)app/res/layout/item_chat_right_view.xml(1 hunks)app/res/layout/item_login_connect_home_apps.xml(1 hunks)app/res/layout/item_login_connect_home_corrupt_apps.xml(1 hunks)app/res/layout/item_progress_job_summary_visit.xml(1 hunks)app/res/layout/screen_connect.xml(1 hunks)app/res/layout/screen_connect_phone_verify.xml(2 hunks)app/res/layout/screen_connect_user_deactivate_otp_verify.xml(2 hunks)app/res/layout/screen_login.xml(5 hunks)app/res/layout/select_install_mode_fragment.xml(2 hunks)app/res/layout/square_card.xml(1 hunks)app/res/layout/view_country_code_edittext.xml(1 hunks)app/res/layout/view_job_card.xml(1 hunks)app/res/layout/view_progress_job_card.xml(1 hunks)app/res/navigation/nav_graph_connect.xml(1 hunks)app/res/navigation/nav_graph_connect_messaging.xml(1 hunks)app/res/navigation/nav_graph_connectid.xml(2 hunks)app/res/values-es/strings.xml(2 hunks)app/res/values-fr/strings.xml(8 hunks)app/res/values-lt/strings.xml(1 hunks)app/res/values-no/strings.xml(1 hunks)app/res/values-pt/strings.xml(7 hunks)app/res/values-sw/strings.xml(1 hunks)app/res/values-ti/strings.xml(1 hunks)app/src/org/commcare/views/ConnectPhoneInputView.java(1 hunks)app/src/org/commcare/views/CustomButtonWithText.java(1 hunks)app/src/org/commcare/views/connect/CircleProgressBar.java(1 hunks)app/src/org/commcare/views/connect/ConnectEditText.java(1 hunks)app/src/org/commcare/views/connect/LinearProgressBar.java(1 hunks)
💤 Files with no reviewable changes (1)
- app/res/layout/grid_header_top_banner.xml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.504Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
app/res/navigation/nav_graph_connect.xml (1)
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.504Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
🔇 Additional comments (33)
app/src/org/commcare/views/CustomButtonWithText.java (1)
3-10: Remove unused imports: looks good.
The cleanup removingandroid.annotation.TargetApiandandroid.os.Buildimports is safe and improves readability without any functional impact.app/res/values-lt/strings.xml (1)
152-152: Correct XML escaping
The updatedroot_element_errorstring now properly escapes the<manifest>tag as<manifest>, ensuring valid XML parsing. This change mirrors fixes in other locale files.app/res/layout/square_card.xml (1)
18-20: Consistent indentation applied
The adjusted indentation of thexmlns:appand layout attributes improves readability and aligns with the project's XML style guidelines. No functional changes introduced.app/res/layout/fragment_recovery_code.xml (2)
43-43: Approve formatting consistency for bold style.
Whitespace adjustment aroundandroid:textStyle="bold"in@+id/phone_titleimproves readability without affecting UI.
149-149: Approve formatting consistency for bold style.
Consistent indentation aroundandroid:textStyle="bold"in@+id/connect_pin_error_messageaids maintainability.app/res/layout/screen_connect_user_deactivate_otp_verify.xml (2)
103-103: Approve styling adjustment for error message.
The whitespace change aroundandroid:textStyle="bold"on@+id/connect_phone_verify_erroris purely cosmetic and maintains consistency with other Connect screens.
114-114: Approve styling adjustment for resend label.
Refining whitespace forandroid:textStyle="bold"on@+id/connect_phone_verify_resendpreserves functionality and matches the style across verification layouts.app/res/values-no/strings.xml (1)
152-152: Fix XML entity escaping.
Corrected theroot_element_errorstring to use<manifest>instead of an improperly escaped sequence, ensuring the literal tag displays correctly. This aligns with updates in other locales.app/res/layout/screen_connect_phone_verify.xml (2)
103-103: Approve styling adjustment for error TextView.
Whitespace refinement aroundandroid:textStyle="bold"on@+id/connect_phone_verify_erroris cosmetic and improves attribute consistency.
115-115: Approve styling adjustment for resend TextView.
The indentation tweak forandroid:textStyle="bold"on@+id/connect_phone_verify_resendmaintains uniform styling across Connect verification screens.app/res/layout/select_install_mode_fragment.xml (2)
2-5: Approve namespace and attribute reordering.
Movingxmlns:androidto the first line of the root<RelativeLayout>and repositioningandroid:idenhances readability without altering behavior.
121-121: This blank line addition is purely cosmetic spacing and has no impact on layout or functionality.app/res/values-es/strings.xml (2)
113-113: Approve Spanish translation adjustment.The corrected
reviewstring"Continuar"aligns with the intended action and improves user experience.
151-151: Approve proper XML escaping.The
root_element_errorstring now correctly escapes<manifest>as<manifest>, fixing the previous rendering issue.app/res/navigation/nav_graph_connectid.xml (2)
129-131: Ensure back stack clearance aligns with flow expectations
Changingapp:popUpToto@id/connectid_signup_fragmentwithpopUpToInclusive="true"will clear the signup fragment (and everything above it) from the back stack. Please verify that this does not inadvertently remove intermediate fragments required later in the ConnectID flow.
141-143: Confirm popUpTo change for secondary phone action
Similarly, this action now pops up to and includesconnectid_signup_fragment. Ensure that all prerequisite arguments and UI state for the secondary-phone fragment remain intact and that no unintended fragments are dropped.app/res/layout/connect_verification_item.xml (1)
30-35: Consider contentDescription for accessibility
Although TextViews typically don’t needcontentDescription, ensure that any non-textual view in this file (e.g., icons in sibling layouts) includes proper accessibility labels.app/res/values-sw/strings.xml (1)
1-15: ```shell
#!/bin/bashVerify XML well-formedness using Python (since xmllint is not available)
python3 - << 'EOF'
import xml.etree.ElementTree as ET
try:
ET.parse('app/res/values-sw/strings.xml')
print("XML is well-formed")
except Exception as e:
print("XML parsing error:", e)
EOFPlease share the output of this check. Once XML well-formedness is confirmed, ensure Android Lint runs in an environment with a valid JAVA_HOME (e.g., install/configure Java and rerun `./gradlew lint`). </details> <details> <summary>app/res/layout/screen_login.xml (3)</summary> `8-8`: **Good change to use a color resource.** The change from a custom resource to the standard `@color/white` improves clarity and consistency. --- `137-138`: **Good RTL support improvement.** Changing from `drawableLeft` to `drawableStart` improves support for right-to-left languages. --- `161-166`: **Good use of RTL support in password field.** The consistent styling with `drawableStart` and match_parent height is appropriate here. </details> <details> <summary>app/res/layout/fragment_connect_delivery_details.xml (1)</summary> `1-11`: **Well-structured ScrollView root element.** The ScrollView setup with a matching background color to the Connect feature is appropriate. </details> <details> <summary>app/res/layout/fragment_connect_delivery_progress.xml (2)</summary> `92-95`: **Button style application is good.** Good use of a predefined style for the negative button. --- `150-170`: **Well-designed TabLayout configuration.** The TabLayout is properly configured with custom indicator, colors, and text appearance. </details> <details> <summary>app/src/org/commcare/views/connect/CircleProgressBar.java (2)</summary> `14-40`: **Well-implemented custom View constructors.** The CircleProgressBar correctly implements all three required constructors with proper delegation to the init method. --- `56-77`: **Efficient onDraw implementation.** The drawing logic is implemented efficiently, calculating dimensions based on the view size and using appropriate Canvas methods. </details> <details> <summary>app/res/navigation/nav_graph_connect.xml (2)</summary> `5-6`: **Verify startDestination aligns with unlock flow.** The graph starts at `connect_jobs_list_fragment`, skipping the `connect_unlock_fragment`. If the unlock screen must be shown first when a user needs to authenticate or unlock, consider changing the `app:startDestination` to `@id/connect_unlock_fragment` or adding conditional navigation logic to route there initially. --- `15-19`: **Inconsistent ID vs. class name in jobs list fragment.** The fragment is declared as ```xml android:id="@+id/connect_jobs_list_fragment" android:name="org.commcare.fragments.connect.ConnectJobsListsFragment"Note the extra 's' in
ConnectJobsListsFragment. Please confirm the actual class name and ensure the ID, Java/Kotlin class, and layout all match (e.g.ConnectJobsListFragmentvsConnectJobsListsFragment).app/res/values-fr/strings.xml (2)
13-13: Verify the tools namespace usage.
You've addedxmlns:toolsto<resources>for lint directives. Ensure that no unintendedtools:ignoreor other directives are affecting string resources.
176-192: Connect feature strings look comprehensive.
The newly added French localization for the Connect flows appears complete and well-structured, aside from the issues noted above.app/res/values-pt/strings.xml (3)
86-86: Check translation consistency.
<string name="proceed">AVANCE</string>looks like French (“avance”). Confirm the intended Portuguese term (e.g., “Prosseguir” or “Avançar”).
13-593: Bulk Portuguese Connect & recovery strings are comprehensive.
The expanded Portuguese localization covers the Connect feature and recovery flows thoroughly and follows the structure of the navigation graph.
102-102:⚠️ Potential issueIncorrect escape and English text.
This line is still in English and uses faulty escaping:- <string name="clearanswer_confirm">Remove the response to \%s\"?"</string> + <string name="clearanswer_confirm">Remover a resposta a "%s"?</string>Translate and fix the escape sequence.
Likely an incorrect or invalid review comment.
app/res/values-fr/strings.xml
Outdated
| <string name="download">Obtenez celle sélectionnée</string> | ||
| <string name="download_forms_result">Resultat du téléchargement</string> | ||
| <string name="downloading_data">Connection au serveur...</string> | ||
| <string name="downloading_data">Connection au serveur…</string> |
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.
Spelling error in translation.
The French term for connection is “connexion” with an ‘x’:
- <string name="downloading_data">Connection au serveur…</string>
+ <string name="downloading_data">Connexion au serveur…</string>Please correct.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <string name="downloading_data">Connection au serveur…</string> | |
| <string name="downloading_data">Connexion au serveur…</string> |
🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 44, the French translation for
"downloading_data" uses the incorrect spelling "Connection". Replace
"Connection" with the correct French spelling "Connexion" to fix the spelling
error.
app/res/values-fr/strings.xml
Outdated
| <string name="connect_learn_status">Vous avez terminé %d de %d cours.\nTerminez votre apprentissage pour obtenir votre certificat.</string> | ||
| <string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string> | ||
| <string name="connect_learn_need_assessment">Complétez l’évaluation pour terminer la formation.</string> | ||
| <string name="connect_learn_failed">Désolé, vous n\'avez pas obtenu la note de passage à votre évaluation. Veuillez réessayer.\nTon score: %d\nNote de passage: %d</string> |
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.
Informal pronoun in failure message.
Standardize to formal register:
- <string name="connect_learn_failed">…\nTon score: %d\nNote de passage: %d</string>
+ <string name="connect_learn_failed">…\nVotre score : %d\nNote de passage : %d</string>🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 205, the failure message uses the
informal pronoun "tu" in "Ton score". Change this to the formal pronoun "votre"
to maintain a consistent formal tone throughout the message. Update the string
to replace "Ton score" with "Votre score" accordingly.
app/res/values-fr/strings.xml
Outdated
| <string name="connect_learn_need_assessment_title">Formation en attente</string> | ||
| <string name="connect_learn_failed_title">Échec de la formation</string> | ||
| <string name="connect_learn_status">Vous avez terminé %d de %d cours.\nTerminez votre apprentissage pour obtenir votre certificat.</string> | ||
| <string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string> |
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.
Informal pronoun and punctuation.
Change “Ton score:” to the formal “Votre score :” and remove the double period:
- <string name="connect_learn_finished">… prodiguer des soins..\nTon score: %d\nNote de passage: %d</string>
+ <string name="connect_learn_finished">… prodiguer des soins.\nVotre score : %d\nNote de passage : %d</string>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string> | |
| <string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins.\nVotre score : %d\nNote de passage : %d</string> |
🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 203, replace the informal "Ton score:"
with the formal "Votre score :" and remove the double period at the end of the
sentence to correct punctuation.
app/res/values-pt/strings.xml
Outdated
| <string name="migration_possible_failure">A CommCare não conseguiu migrar todos os seus dados durante uma atualização do aplicativo. Reinicie o CommCare para tentar corrigir isso. Se esta mensagem persistir, pode ser necessário \'Limpar dados\' do CommCare no menu Configurações do seu dispositivo.</string> | ||
| <string name="migration_failure_title">Erro de migração</string> | ||
| <string name="multiple_apps_limit_message">Você atingiu seu limite de aplicativos instalados; você só pode ter até %s aplicativos instalados por vez.\n\nSe quiser instalar um novo aplicativo, você pode primeiro desinstalar um aplicativo existente, o que pode ser feito no gerenciador de aplicativos.</string> | ||
| <string name="back_to_manager">Voltar ao Gerenciador de aplicativos""</string> |
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.
Syntax error: extra quotation mark.
This entry has an unintended extra ":
- <string name="back_to_manager">Voltar ao Gerenciador de aplicativos""</string>
+ <string name="back_to_manager">Voltar ao Gerenciador de aplicativos</string>Please remove the stray quote.
🤖 Prompt for AI Agents (early access)
In app/res/values-pt/strings.xml at line 42, there is an extra quotation mark at
the end of the string value for "back_to_manager". Remove the stray double quote
so the string ends correctly with a single closing quotation mark.
app/res/values-pt/strings.xml
Outdated
| <string name="save_all_answers">Salvar Formulário</string> | ||
| <string name="save_data_message">Por favor, salvar Formulário para manter as respostas.</string> | ||
| <string name="save_enter_data_description">Você está no fim de \"%s\".</string> | ||
| <string name="save_enter_data_description">Você está no fim de \%s\"."</string> |
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.
Faulty escape sequence.
Correct the quotes and percent placeholder:
- <string name="save_enter_data_description">Você está no fim de \%s\"."</string>
+ <string name="save_enter_data_description">Você está no fim de "%s".</string>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <string name="save_enter_data_description">Você está no fim de \%s\"."</string> | |
| <string name="save_enter_data_description">Você está no fim de "%s".</string> |
🤖 Prompt for AI Agents (early access)
In app/res/values-pt/strings.xml at line 191, the string contains an incorrect
escape sequence with a backslash before the percent sign and mismatched quotes.
Remove the backslash before the percent sign and ensure the string is properly
enclosed in double quotes without extra or misplaced characters.
|
@Jignesh-dimagi Approved on my side, but I can't mark it so since I created it myself. So feel free to self approve and merg this. |
…ts visibility controlled by code at https://github.com/dimagi/commcare-android/blob/a8818b2ac2e3e7abb14bd92cf2dcaa83ea8b5c09/app/src/org/commcare/activities/StandardHomeActivityUIController.java#L176 https://github.com/dimagi/commcare-android/blob/a8818b2ac2e3e7abb14bd92cf2dcaa83ea8b5c09/app/src/org/commcare/activities/StandardHomeActivityUIController.java#L87
| android:layout_width="match_parent" | ||
| android:layout_height="wrap_content" | ||
| android:layout_below="@+id/viewJobCard" | ||
| android:visibility="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.
do we need to do the same in the landscape version of the file ?
|
@damagatchi retest this please |
| gotoHome() | ||
| onView(withId(R.id.nsv_home_screen)) | ||
| .perform(swipeUp()) | ||
| onView(withId(R.id.nsv_home_screen)) // This is because landscape view needs more scroll up to view more than 90% of the log out button |
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.
you can do this instead -
onView(withId(R.id. nsv_home_screen)).perform(repeatedlyUntil(swipeUp(),
hasDescendant(withText("Log out of CommCare")),
3))`
|
@damagatchi retest this please |
|
@damagatchi please retest this |
|
@damagatchi retest this please |
|
@damagatchi retest this please |
Copy of #3092 to try and trigger Code Rabbit again.
Labels and Review