Skip to content
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

GeoWidget Decouple Refactor #3020

Merged
merged 109 commits into from
May 20, 2024
Merged

GeoWidget Decouple Refactor #3020

merged 109 commits into from
May 20, 2024

Conversation

FikriMilano
Copy link
Collaborator

@FikriMilano FikriMilano commented Jan 29, 2024

IMPORTANT: Where possible all PRs must be linked to a Github issue

Fixes #3002

  • Created a launcher fragment on quest
    • So that we can have a foundation to launch the new geowidget fragment with callbacks and data from outside of geowidget module asynchronously, we cannot do this with the Android Navigation API
  • Separated configuration from geowidget module
  • Defined a model on the geowidget module side to represent a location
  • Remove FHIR and quest dependency on the geowidget module side
  • Created a builder for the geowidget module's fragment, for ease of defining callbacks
  • Retrieve and populate locations to the map without coupling with Group
  • Retrieve extracted resource ids (from submitted Questionnaire) and populate it to the map

Todo:

  • Open a profile, we need to decide on how we connect Location resource to a Group/Patient/others resources [BLOCKED]
  • Retrieve data starting from List or Linkage resource, in order to have connection between the Location and it's Group/Patient/other resource [BLOCKED]

Engineer Checklist

  • I have written Unit tests for any new feature(s) and edge cases for bug fixes
  • I have added any strings visible on UI components to the strings.xml file
  • I have updated the CHANGELOG.md file for any notable changes to the codebase
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app
  • I have checked that this PR does NOT introduce breaking changes that require an update to Content and/or Configs? If it does add a sample here or a link to exactly what changes need to be made to the content.

Code Reviewer Checklist

  • I have verified Unit tests have been written for any new feature(s) and edge cases
  • I have verified any strings visible on UI components are in the strings.xml file
  • I have verifed the CHANGELOG.md file has any notable changes to the codebase
  • I have verified the solution has been implemented in a configurable and generic way for reuseable components
  • I have built and run the FHIRCore app to verify the change fixes the issue and/or does not break the app

@FikriMilano FikriMilano self-assigned this Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

Attention: Patch coverage is 9.24609% with 638 lines in your changes are missing coverage. Please review.

Project coverage is 27.9%. Comparing base (ac82739) to head (cc1f706).
Report is 56 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main   #3020     +/-   ##
=========================================
- Coverage     29.6%   27.9%   -1.7%     
- Complexity     658     689     +31     
=========================================
  Files          239     263     +24     
  Lines        11204   12381   +1177     
  Branches      1948    2164    +216     
=========================================
+ Hits          3323    3465    +142     
- Misses        7447    8457   +1010     
- Partials       434     459     +25     
Flag Coverage Δ
engine 64.8% <33.3%> (-1.4%) ⬇️
geowidget 18.7% <19.6%> (-28.5%) ⬇️
quest 5.2% <0.5%> (-0.2%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ister/fhircore/engine/domain/model/LauncherType.kt 100.0% <100.0%> (ø)
...gister/fhircore/engine/util/SharedPreferenceKey.kt 100.0% <100.0%> (ø)
...egister/fhircore/quest/navigation/NavigationArg.kt 0.0% <ø> (ø)
...er/fhircore/quest/ui/shared/components/CardView.kt 0.0% <ø> (ø)
...er/fhircore/engine/data/local/DefaultRepository.kt 66.8% <0.0%> (-1.2%) ⬇️
...ister/fhircore/quest/ui/launcher/GeoWidgetEvent.kt 0.0% <0.0%> (ø)
...ter/fhircore/engine/util/location/LocationUtils.kt 0.0% <0.0%> (ø)
...r/fhircore/geowidget/screens/GeoWidgetViewModel.kt 95.4% <95.3%> (+8.7%) ⬆️
...fhircore/quest/util/extensions/ConfigExtensions.kt 0.0% <0.0%> (ø)
...register/fhircore/quest/event/ToolbarClickEvent.kt 0.0% <0.0%> (ø)
... and 16 more

... and 10 files with indirect coverage changes

@FikriMilano FikriMilano changed the title Decouple GeoWidget Decouple GeoWidget Refactor Jan 29, 2024
@FikriMilano FikriMilano changed the title Decouple GeoWidget Refactor GeoWidget Decople Refactor Jan 29, 2024
@FikriMilano FikriMilano closed this Feb 1, 2024
@FikriMilano FikriMilano force-pushed the 3002-geowidget-decouple-refactor branch from d395a2b to e353865 Compare February 1, 2024 13:27
@FikriMilano FikriMilano reopened this Feb 2, 2024
@FikriMilano FikriMilano force-pushed the 3002-geowidget-decouple-refactor branch from ad02569 to 52ab271 Compare February 2, 2024 13:20
aurangzaibumer and others added 27 commits April 25, 2024 12:15
# Conflicts:
#	android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ApplicationConfiguration.kt
#	android/engine/src/main/java/org/smartregister/fhircore/engine/util/SharedPreferenceKey.kt
#	android/quest/src/main/java/org/smartregister/fhircore/quest/navigation/MainNavigationScreen.kt
#	android/quest/src/main/java/org/smartregister/fhircore/quest/navigation/NavigationArg.kt
#	android/quest/src/main/java/org/smartregister/fhircore/quest/ui/main/AppMainActivity.kt
#	android/quest/src/main/java/org/smartregister/fhircore/quest/util/LocationUtils.kt
#	android/quest/src/main/res/navigation/application_nav_graph.xml
* Fix configuration of add location button on map view

* feedback updated
# Conflicts:
#	android/engine/src/main/java/org/smartregister/fhircore/engine/configuration/app/ApplicationConfiguration.kt
@ellykits ellykits merged commit b97ceea into main May 20, 2024
4 of 5 checks passed
@ellykits ellykits deleted the 3002-geowidget-decouple-refactor branch May 20, 2024 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple Locations display on the Geo-Widget module from the Households.
7 participants