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

fixed map search #3491

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

fixed map search #3491

wants to merge 9 commits into from

Conversation

syedowaisali
Copy link
Contributor

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

Fixes [link to issue]

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

@syedowaisali syedowaisali marked this pull request as draft September 12, 2024 08:34
Copy link
Contributor

@f-odhiambo f-odhiambo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments

@@ -123,7 +123,7 @@
<string name="submit_questionnaire">Submit</string>
<string name="invalid_base_resource">The base resource for GeoWidgetConfiguration MUST be Location</string>
<string name="no_search_coonfigs_provided">No configs provided for search bar</string>
<string name="no_found_locations_matching_text">No location found matching text \"%1$s\"</string>
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@owais-vd This change should not be here. But pushed to the Strings XML file of the build variant

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.2%. Comparing base (2f8055b) to head (e05b2c5).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##              main   #3491   +/-   ##
=======================================
  Coverage     27.2%   27.2%           
  Complexity     749     749           
=======================================
  Files          275     275           
  Lines        13940   13936    -4     
  Branches      2532    2531    -1     
=======================================
  Hits          3794    3794           
+ Misses        9622    9618    -4     
  Partials       524     524           
Flag Coverage Δ
engine 64.3% <ø> (ø)

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

Files with missing lines Coverage Δ
...er/fhircore/geowidget/screens/GeoWidgetFragment.kt 0.6% <ø> (+<0.1%) ⬆️
...re/quest/ui/geowidget/GeoWidgetLauncherFragment.kt 0.0% <ø> (ø)

@syedowaisali syedowaisali marked this pull request as ready for review September 19, 2024 08:41
Comment on lines 321 to 329
private fun zoomToLocationsOnMap(features: List<Feature>) {
if (features.isEmpty()) return
if (features.isEmpty()) {
geoJsonSource?.setGeoJson(null as FeatureCollection?)
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) }
return
}
featureCollection = FeatureCollection.fromFeatures(features)

val locationPoints =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation was refactored.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would no longer be required.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #3488

Comment on lines 183 to 191
geoWidgetViewModel.features.postValue(geoJsonFeatures)
if (geoJsonFeatures.isEmpty()) {
geoWidgetLauncherViewModel.emitSnackBarState(
SnackBarMessageConfig(
message =
getString(R.string.no_found_locations_matching_text, searchText),
getString(R.string.no_found_locations_matching_text, searchText),
),
)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition has just been inverted. Not necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@owais-vd @syedowaisali please look into this.

Comment on lines +1 to +3
<resources>
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string>
</resources>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Close this PR and create a new PR pointing to the main branch with this change in gizEir build variant. @f-odhiambo

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellykits I might be wrong but this is on the gizEir strings.xml. I think it's fine there

Comment on lines 321 to 329
private fun zoomToLocationsOnMap(features: List<Feature>) {
if (features.isEmpty()) return
if (features.isEmpty()) {
geoJsonSource?.setGeoJson(null as FeatureCollection?)
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) }
return
}
featureCollection = FeatureCollection.fromFeatures(features)

val locationPoints =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would no longer be required.

Comment on lines 321 to 329
private fun zoomToLocationsOnMap(features: List<Feature>) {
if (features.isEmpty()) return
if (features.isEmpty()) {
geoJsonSource?.setGeoJson(null as FeatureCollection?)
mapView.getMapAsync { mapboxMap -> mapboxMap.easeCamera(CameraUpdateFactory.newCameraPosition(CameraPosition.DEFAULT)) }
return
}
featureCollection = FeatureCollection.fromFeatures(features)

val locationPoints =
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #3488

Comment on lines +1 to +3
<resources>
<string name="no_found_locations_matching_text">No caregiver found matching text \"%1$s\"</string>
</resources>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ellykits I might be wrong but this is on the gizEir strings.xml. I think it's fine there

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.

5 participants