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

Implement searchable multiselect widget #3123

Merged
merged 35 commits into from
May 13, 2024

Conversation

ellykits
Copy link
Collaborator

@ellykits ellykits commented Mar 5, 2024

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

Fixes #3068

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

Start implementation on multi-select view. Includes the checkbox and listeners

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@ellykits
Copy link
Collaborator Author

ellykits commented Mar 5, 2024

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

@ellykits
Copy link
Collaborator Author

ellykits commented Mar 5, 2024

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
Copy link
Collaborator Author

ellykits commented Mar 5, 2024

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

@ellykits ellykits added the Work In Progress Describes an items that is not complete. Mostly used for scoping issues of discussions label Mar 5, 2024
@ellykits ellykits self-assigned this Mar 5, 2024
Copy link

codecov bot commented Mar 5, 2024

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

@@            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 Coverage Δ
engine 65.6% <36.9%> (-0.6%) ⬇️
geowidget 47.2% <ø> (ø)
quest 5.5% <4.2%> (+<0.1%) ⬆️

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

Files Coverage Δ
...r/fhircore/engine/datastore/PreferenceDataStore.kt 71.4% <100.0%> (+2.1%) ⬆️
...gister/fhircore/engine/datastore/ProtoDataStore.kt 69.6% <100.0%> (+4.1%) ⬆️
...ister/fhircore/engine/domain/model/ActionConfig.kt 77.0% <100.0%> (+0.4%) ⬆️
...g/smartregister/fhircore/engine/ui/theme/Colors.kt 97.3% <100.0%> (+0.9%) ⬆️
...egister/fhircore/quest/navigation/NavigationArg.kt 0.0% <ø> (ø)
...ister/fhircore/quest/ui/register/RegisterScreen.kt 0.0% <ø> (ø)
...fhircore/quest/ui/shared/components/DividerView.kt 0.0% <ø> (ø)
...ircore/quest/ui/shared/components/ViewGenerator.kt 0.0% <ø> (ø)
...e/quest/ui/usersetting/UserSettingInsightScreen.kt 10.6% <ø> (ø)
...gine/configuration/workflow/ApplicationWorkflow.kt 0.0% <0.0%> (ø)
... and 17 more

... and 7 files with indirect coverage changes

dubdabasoduba and others added 20 commits March 8, 2024 15:50
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
…opensrp/fhircore into implement-searchable-multiselect-widget
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Use Tree data structure as required. Search Tree instead of
searching the map. Render the UI from the Tree.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Hide keyboard when search action is triggered. Reset data when search
text is empty.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Also refactored how root nodes are identified. Use configuration instead
of defaulting to a node without a parent node as the root node.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Add comma separated values for _syncLocations query parameter for all requests for the
configured sync Resources.

Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
Signed-off-by: Elly Kitoto <junkmailstoelly@gmail.com>
@dubdabasoduba dubdabasoduba marked this pull request as ready for review April 23, 2024 13:05
@ellykits ellykits merged commit 4f2f24b into main May 13, 2024
2 of 3 checks passed
@ellykits ellykits deleted the implement-searchable-multiselect-widget branch May 13, 2024 12:16
@ellykits
Copy link
Collaborator Author

More tests to be added later, issue for tracking #3253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Work In Progress Describes an items that is not complete. Mostly used for scoping issues of discussions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement a configurable location selector UI
3 participants