opensrp / fhircore

FHIR Core / OpenSRP 2 is a Kotlin application for delivering offline-capable, mobile-first healthcare project implementations from local community to national and international scale using FHIR and WHO Smart Guidelines on Android.
https://smartregister.org
Apache License 2.0
50 stars 39 forks source link

Implement searchable multiselect widget #3123

Closed ellykits closed 1 month ago

ellykits commented 4 months ago

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

Fixes https://github.com/opensrp/fhircore/issues/3068

Engineer Checklist

Code Reviewer Checklist

ellykits commented 4 months ago

Drafted this PR to showcase the WIP for the new location selector UI

ellykits commented 4 months ago

This is not the complete UI, the rest of the work is still under active development.

@dubdabasoduba verify the UX

Screencast from 03-05-2024 05:31:55 PM.webm

ellykits commented 4 months ago

This implementation should work with data from any Resource. The UI can also be partially customized.

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 29.5%. Comparing base (ac82739) to head (3667e78). Report is 38 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/graphs/tree.svg?width=650&height=150&src=pr&token=IJUTHZUGGH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp)](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) ```diff @@ Coverage Diff @@ ## main #3123 +/- ## ========================================= - Coverage 29.6% 29.5% -0.2% - Complexity 658 678 +20 ========================================= Files 239 247 +8 Lines 11204 11646 +442 Branches 1948 2021 +73 ========================================= + Hits 3323 3441 +118 - Misses 7447 7756 +309 - Partials 434 449 +15 ``` | [Flag](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [engine](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `65.6% <36.9%> (-0.6%)` | :arrow_down: | | [geowidget](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `47.2% <ø> (ø)` | | | [quest](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | `5.5% <4.2%> (+<0.1%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | Coverage Δ | | |---|---|---| | [...r/fhircore/engine/datastore/PreferenceDataStore.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fdatastore%2FPreferenceDataStore.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvZGF0YXN0b3JlL1ByZWZlcmVuY2VEYXRhU3RvcmUua3Q=) | `71.4% <100.0%> (+2.1%)` | :arrow_up: | | [...gister/fhircore/engine/datastore/ProtoDataStore.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fdatastore%2FProtoDataStore.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvZGF0YXN0b3JlL1Byb3RvRGF0YVN0b3JlLmt0) | `69.6% <100.0%> (+4.1%)` | :arrow_up: | | [...ister/fhircore/engine/domain/model/ActionConfig.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fdomain%2Fmodel%2FActionConfig.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvZG9tYWluL21vZGVsL0FjdGlvbkNvbmZpZy5rdA==) | `77.0% <100.0%> (+0.4%)` | :arrow_up: | | [...g/smartregister/fhircore/engine/ui/theme/Colors.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fui%2Ftheme%2FColors.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvdWkvdGhlbWUvQ29sb3JzLmt0) | `97.3% <100.0%> (+0.9%)` | :arrow_up: | | [...egister/fhircore/quest/navigation/NavigationArg.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fnavigation%2FNavigationArg.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L25hdmlnYXRpb24vTmF2aWdhdGlvbkFyZy5rdA==) | `0.0% <ø> (ø)` | | | [...ister/fhircore/quest/ui/register/RegisterScreen.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fregister%2FRegisterScreen.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL3JlZ2lzdGVyL1JlZ2lzdGVyU2NyZWVuLmt0) | `0.0% <ø> (ø)` | | | [...fhircore/quest/ui/shared/components/DividerView.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fshared%2Fcomponents%2FDividerView.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL3NoYXJlZC9jb21wb25lbnRzL0RpdmlkZXJWaWV3Lmt0) | `0.0% <ø> (ø)` | | | [...ircore/quest/ui/shared/components/ViewGenerator.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fshared%2Fcomponents%2FViewGenerator.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL3NoYXJlZC9jb21wb25lbnRzL1ZpZXdHZW5lcmF0b3Iua3Q=) | `0.0% <ø> (ø)` | | | [...e/quest/ui/usersetting/UserSettingInsightScreen.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fquest%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fquest%2Fui%2Fusersetting%2FUserSettingInsightScreen.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9xdWVzdC9zcmMvbWFpbi9qYXZhL29yZy9zbWFydHJlZ2lzdGVyL2ZoaXJjb3JlL3F1ZXN0L3VpL3VzZXJzZXR0aW5nL1VzZXJTZXR0aW5nSW5zaWdodFNjcmVlbi5rdA==) | `10.6% <ø> (ø)` | | | [...gine/configuration/workflow/ApplicationWorkflow.kt](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree&filepath=android%2Fengine%2Fsrc%2Fmain%2Fjava%2Forg%2Fsmartregister%2Ffhircore%2Fengine%2Fconfiguration%2Fworkflow%2FApplicationWorkflow.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp#diff-YW5kcm9pZC9lbmdpbmUvc3JjL21haW4vamF2YS9vcmcvc21hcnRyZWdpc3Rlci9maGlyY29yZS9lbmdpbmUvY29uZmlndXJhdGlvbi93b3JrZmxvdy9BcHBsaWNhdGlvbldvcmtmbG93Lmt0) | `0.0% <0.0%> (ø)` | | | ... and [17 more](https://app.codecov.io/gh/opensrp/fhircore/pull/3123?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp) | | ... and [7 files with indirect coverage changes](https://app.codecov.io/gh/opensrp/fhircore/pull/3123/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=opensrp)
ellykits commented 1 month ago

More tests to be added later, issue for tracking https://github.com/opensrp/fhircore/issues/3253