Skip to content

Conversation

@OrangeAndGreen
Copy link
Contributor

https://dimagi.atlassian.net/browse/CCCT-606

cross-request: dimagi/commcare-core#1455

Product Description

Removes the pay-per-visit text from the job summary card that is shown on several Connect pages.
The concept increasingly does not make sense since opportunities often involve several visits with different pay amounts.
So if a user gets $10 for an initial visit and $5 for a follow-up visit, an overall "pay per visit" isn't meaningful.
View on most pages:

View on app home (with daily progress):

Technical Summary

Removes the pay-per-visit UI fields from the two related cards, and code on related pages that updated the value of the pay-per-visit text.

Feature Flag

Connect

Safety Assurance

Safety story

Relatively simple change, just removing some UI fields and the code that updates them. I also viewed the tiles on each of the related pages to verify that their layout still looks correct, and had to change the layout for the "working hours" to still line up properly.

Automated test coverage

No automated tests for Connect yet.

QA Plan

View the job summary card on any of the pages listed below and verify that there is no info shown related to "pay per visit":

  • Job intro
  • Learning progress
  • App home
  • Delivery progress

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, the "QA Note" label is set correctly
  • Does the PR introduce any major changes worth communicating ? If yes, the "Release Note" label is set and a "Release Note" is specified in PR description.
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2025

📝 Walkthrough

Walkthrough

The changes streamline the user interface by removing redundant UI elements related to job payment information. In the XML layout files (both view_job_card.xml and view_progress_job_card.xml), a LinearLayout containing two TextView elements was removed, and the layout constraints of adjacent elements were updated to reference an existing element (tv_job_discrepation) directly. In the Java source files, several fragments and the activity controller had code removed: variables and methods that handled the display of job payment data (using ConnectMediumTextView) were deleted. These modifications affect the UI update logic by excluding payment details from the job information display while maintaining other job details such as title, description, end date, and working hours. No public API changes were made.

Possibly related PRs


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6ffc71 and 332d798.

📒 Files selected for processing (7)
  • app/res/layout/view_job_card.xml (2 hunks)
  • app/res/layout/view_progress_job_card.xml (2 hunks)
  • app/src/org/commcare/activities/StandardHomeActivityUIController.java (0 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryDetailsFragment.java (0 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryProgressFragment.java (0 hunks)
  • app/src/org/commcare/fragments/connect/ConnectJobIntroFragment.java (0 hunks)
  • app/src/org/commcare/fragments/connect/ConnectLearningProgressFragment.java (0 hunks)
💤 Files with no reviewable changes (5)
  • app/src/org/commcare/fragments/connect/ConnectLearningProgressFragment.java
  • app/src/org/commcare/fragments/connect/ConnectDeliveryProgressFragment.java
  • app/src/org/commcare/activities/StandardHomeActivityUIController.java
  • app/src/org/commcare/fragments/connect/ConnectDeliveryDetailsFragment.java
  • app/src/org/commcare/fragments/connect/ConnectJobIntroFragment.java
🔇 Additional comments (6)
app/res/layout/view_job_card.xml (3)

47-47: Updated Constraint for tv_view_more
The top constraint for tv_view_more has been updated to anchor directly below tv_job_discrepation. This change correctly adjusts the vertical spacing after the removal of the pay-per-visit UI elements.


57-60: Revised Constraint for tvDailyVisitTitle
The top constraint for tvDailyVisitTitle now references tv_job_discrepation instead of a removed container. This ensures the element is properly positioned in the flow of the card layout.


67-70: Adjusted Constraint for tv_job_time
The top constraint for tv_job_time has been changed to reference tvDailyVisitTitle, ensuring a consistent stacking order after eliminating the redundant pay-per-visit section. Please verify that the visual spacing remains optimal on different device sizes.

app/res/layout/view_progress_job_card.xml (3)

47-48: Updated Constraint for tv_view_more
The constraint update for tv_view_more now anchors it to tv_job_discrepation. This change reflects the removal of the original pay-per-visit layout and keeps the vertical alignment consistent.


57-60: Revised Constraint for tvDailyVisitTitle
The top constraint for tvDailyVisitTitle is now set to tv_job_discrepation, ensuring that the element is placed correctly after the removal of the intermediate pay-per-visit container.


69-70: Adjusted Constraint for tv_job_time
Updating tv_job_time’s top constraint to anchor below tvDailyVisitTitle helps maintain a clear and logical layout order following the UI simplification. It is recommended to manually verify the layout on various screen sizes.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Jignesh-dimagi
Copy link
Contributor

@OrangeAndGreen I have approved the MR but also thinking if we can just make visibility = gone in view_job_card.xml and view_progress_job_card.xml for per_visit linearLayout so that all other calculations remains there only to show per visit charges in future

@OrangeAndGreen
Copy link
Contributor Author

Thanks to both. I think we're confident that this concept has changed enough that we can remove this field from the UI. Also, there are plans to do an additional overhaul of this card in the near future.

@OrangeAndGreen OrangeAndGreen merged commit dd73170 into connect_qa Feb 27, 2025
2 checks passed
@OrangeAndGreen OrangeAndGreen deleted the dv/no_pay_per_visit branch February 27, 2025 14:46
@coderabbitai coderabbitai bot mentioned this pull request May 8, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants