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

Add Map view as default View #3110

Merged
merged 17 commits into from
Mar 21, 2024

Conversation

aurangzaibumer
Copy link
Contributor

@aurangzaibumer aurangzaibumer commented Feb 28, 2024

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

Fixes #3138

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

@aurangzaibumer aurangzaibumer self-assigned this Feb 28, 2024
@aurangzaibumer aurangzaibumer changed the title adding set location dialog Add Map view as default View Mar 4, 2024
@aurangzaibumer aurangzaibumer marked this pull request as ready for review March 4, 2024 13:15

private fun setLocationFromDbCollector() {
viewLifecycleOwner.lifecycleScope.launch {
delay(1000)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

delay added to render service location into map.

Copy link
Member

Choose a reason for hiding this comment

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

can you explain why? Also need to move this number to a constant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I came up with a weird issue, most of the time the flow wasn't collecting anything and screen just went white right after loading. Added a delay fixed this issue. Probably will re-investigate why it was happening.

Copy link
Member

Choose a reason for hiding this comment

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

ah interesting, yea worth looking into a bit more but this seems like a reasonable fix for now. Can you add a comment in the code explaining this, and also move the 1k seconds to a semantically named constant here, like PRE_LOADING_TIMEOUT, or something clearer than that

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you figure out why the flow wasn't collecting any items? Could it be an issue with subscribing to cold/hot flow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried some small fixes but no luck
@ellykits would you have sometime to look into this with me?


private fun setLocationFromDbCollector() {
viewLifecycleOwner.lifecycleScope.launch {
delay(1000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you figure out why the flow wasn't collecting any items? Could it be an issue with subscribing to cold/hot flow?

Copy link
Member

@pld pld left a comment

Choose a reason for hiding this comment

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

Let's add docs for this, and also make a not in the features list on this, it's a great new feature to support!

@dubdabasoduba dubdabasoduba merged commit eae89d3 into 3002-geowidget-decouple-refactor Mar 21, 2024
@dubdabasoduba dubdabasoduba deleted the default_map_view branch March 21, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add the ability to define the default view between the register and the map view
4 participants