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 displaying valid and invalid drafts on a map #5786

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Oct 19, 2023

Closes #5783

Why is this the best possible solution? Were any other approaches considered?

I've updated the method responsible for returning map icons based on the status. Both valid and invalid drafts are displayed in the same way like incomplete ones before (with a blue icon).

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

This is a small change so testing the scenario described in the issue should be enough. However, there might be also other similar issues caused by introducing new instance statuses (valid and invalid) so be careful.

Do we need any specific form for testing your changes? If so, please attach one.

No.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • added a comment above any new strings describing it for translators
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 changed the title Collect 5783 Fixed displaying valid and invalid drafts on a map Oct 19, 2023
@grzesiek2010 grzesiek2010 marked this pull request as ready for review October 19, 2023 10:39
@@ -194,7 +194,7 @@ class FormMapViewModel(

private fun getDrawableIdForStatus(status: String, enlarged: Boolean): Int {
return when (status) {
Instance.STATUS_INCOMPLETE -> if (enlarged) R.drawable.ic_room_form_state_incomplete_48dp else R.drawable.ic_room_form_state_incomplete_24dp
Instance.STATUS_INCOMPLETE, Instance.STATUS_VALID, Instance.STATUS_INVALID -> if (enlarged) R.drawable.ic_room_form_state_incomplete_48dp else R.drawable.ic_room_form_state_incomplete_24dp
Copy link
Member Author

@grzesiek2010 grzesiek2010 Oct 19, 2023

Choose a reason for hiding this comment

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

We might want to distinguish somehow valid and invalid instances (by displaying different icons/info) but that's something for a separate issue that could be a part of v2023.4 @lognaturel what do you think?

@dbemke
Copy link

dbemke commented Oct 20, 2023

Tested with Success!

Verified on device with Android 10

Verified cases:

@srujner
Copy link

srujner commented Oct 20, 2023

Tested with Success!

Verified on device with Android 13

@grzesiek2010 grzesiek2010 merged commit 5901547 into getodk:v2023.3.x Oct 20, 2023
seadowg pushed a commit to seadowg/collect that referenced this pull request Oct 24, 2023
Fixed displaying valid and invalid drafts on a map
seadowg pushed a commit to seadowg/collect that referenced this pull request Oct 30, 2023
Fixed displaying valid and invalid drafts on a map
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.

4 participants