-
Notifications
You must be signed in to change notification settings - Fork 65
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
Create Insights screen and show user info, practitioner details and sync statistics #2873
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2873 +/- ##
=========================================
+ Coverage 64.5% 66.9% +2.3%
- Complexity 1075 1103 +28
=========================================
Files 218 223 +5
Lines 9635 10434 +799
Branches 1897 1920 +23
=========================================
+ Hits 6218 6984 +766
+ Misses 2234 2224 -10
- Partials 1183 1226 +43
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ange # Conflicts: # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingInsightScreen.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingScreen.kt
…een' into feature/user_setting_insight_screen # Conflicts: # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserInsightScreenFragment.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingInsightScreen.kt
…_setting_screen_modification # Conflicts: # android/quest/src/androidTest/java/org/smartregister/fhircore/quest/integration/ui/usersetting/UserSettingScreenTest.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingScreen.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingViewModel.kt # android/quest/src/main/java/org/smartregister/fhircore/quest/ui/usersetting/UserSettingsEvent.kt
@brandy-kay Please attach a video with the new changes. |
I have uploaded the video showing the new User Insight Screen view. From the recording there are views that are not visible because we are using a non proxy variant. You can test it using a proxy variant to see those views. @ellykits Screencast.from.05-12-2023.05.57.12.ALASIRI.webm |
@@ -24,7 +24,7 @@ | |||
<string name="syncing_down" translatable="false">Syncing down</string> | |||
<string name="syncing_initiated">Sync initiated…</string> | |||
<string name="sync_failed">Sync failed. Check internet connection or try again later</string> | |||
<string name="sync_completed_with_errors">Sync completed with errors. Retrying…</string> | |||
<string name="sync_completed_with_errors" translatable="false">Sync completed with errors. Retrying…</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.
This string should be translatable. Remove translatable=false
property.
<string name="percentage_progress" translatable="false">%1$d%%</string> | ||
<string name="error_occurred" translatable="false">Something went wrong...</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.
These strings should be translatable. Remove translatable=false property.
headingOne: String?, | ||
contentOne: String?, | ||
headingTwo: String?, | ||
contentTwo: String?, | ||
headingThree: String?, | ||
contentThree: String?, | ||
headingFour: String?, | ||
contentFour: 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.
This can be refactored to accept any n
number of items. The header + content information can be captured in a Pair
class as key (header) and value(content). Have the items in LIST. Iterate through the list to render the desired content. (The field properties like color can be configured). If need be you may create a new data class to capture the required items if a Pair
class will not suffice.
For the UI @Raynafs Can you only display a section if there is content below the section header? The header section should not appear if there is no content to display. From the video shared |
@ellykits Yes sure working on it |
I have edited the screen to show a different view when synced and unsynced. Kindly check. |
@ellykits |
@karina4050. Thanks for the suggestion. |
We can include some server information like version etc. Keycloak details are sensitive as they are used during deployment. |
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.
The PR looks good now. Resolve the issue with the strings so we can merge.
<string name="select_month" translatable="false">Select Month</string> | ||
<string name="user" translatable="false">User</string> | ||
<string name="team" translatable="false">Team</string> | ||
<string name="locality" translatable="false">Locality</string> | ||
<string name="team_organization" translatable="false">Team(Organization)</string> | ||
<string name="care_team" translatable="false">Care Team</string> | ||
<string name="location" translatable="false">Location</string> | ||
<string name="app_version_code" translatable="false">App version code</string> | ||
<string name="build_date" translatable="false">Build date</string> | ||
<string name="manufacture" translatable="false">Manufacture</string> | ||
<string name="app_versions" translatable="false">App version</string> | ||
<string name="os_version" translatable="false">OS Version</string> | ||
<string name="device_date" translatable="false">Date</string> | ||
<string name="device" translatable="false">Device</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.
These Strings should be translatable. Delete the "translatabale = false" property.
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.
Actually can you deleted this property in all the strings, only the app_name should not be translatable and any branding texts.
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.
Yes sure. Working on it
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.
also, when we remove translatable and the strings get highlighted with a red line, does it mean we have to provide the translations on the alternative string resource like that for Swahili and French? @ellykits @SebaMutuku
…m:opensrp/fhircore into feature/users_setting_screen_modification
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.
LGTM 👍
…ync statistics (#2873) * Added user first and last name * fixes the user assigned area * Changes OPENSRP logo color to match new design (black and white) * addes location details * completes the user setting ui editing * Adds refresh with translations and insights page * addes the user setting ui tests * Adds info view * addes the user setting viewmodel tests * runs spotless checks * Creating UserInsight Screen * addes navigation to insight screen * minor edits * designs the user insight screen * adds user insight fragment test and user viewModel test * Writes tests for UserInsight Screen * minor edits * merges user insight branch * Setting up unsynced screen * works on getting database version * finally the unsynched data is represented on the ui * writes user setting viewmodel test * completes user setting viewmodel test and edited user insight screen test * edits the organization text view * adds a separator between user info and unsynced resources * removes hello blank fragment from quest string resource. * fixes code format, removes unused unsyncedResources,removes unessesary plugin and renames OnOfflinemap to onLaunchOfflineMaps * Update UserSettingInsightScreen to match design * edits user insight screen components to use a single view * fixes Questionnaire activity test * fixes Questionnaire activity test * runs spotless check * runs spotless check * still runs spotless check * edits insight info view * edits insight info view * Fix UserInsightScreen padding * Show unsynced and synced views * Add string translations * Fix UserInsightScreen * Remove all unnecessary translatable=false in string.xml --------- Co-authored-by: Raynafs <[email protected]> Co-authored-by: Sharon Akinyi <[email protected]> Co-authored-by: Benjamin Mwalimu <[email protected]> Co-authored-by: Peter Lubell-Doughtie <[email protected]> Co-authored-by: Sebastian <[email protected]>
IMPORTANT: Where possible all PRs must be linked to a Github issue
Fixes #2857
Engineer Checklist
strings.xml
file./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guideCode Reviewer Checklist
strings.xml
file