Skip to content

Block adding point when invalid#7052

Merged
grzesiek2010 merged 7 commits intogetodk:masterfrom
seadowg:invalid-block
Jan 30, 2026
Merged

Block adding point when invalid#7052
grzesiek2010 merged 7 commits intogetodk:masterfrom
seadowg:invalid-block

Conversation

@seadowg
Copy link
Member

@seadowg seadowg commented Jan 27, 2026

Closes #6970
Blocked by #7021
Blocked by #7050

This removes the ability to add new points while the trace/shape is invalid and also:

  • Adds a success message when the invalid state is fixed
  • Makes the error snackbar dismissible

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

Comments inline.

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?

Just the new features here: no map code was affected so can be tested in any one of them.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • 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

@seadowg seadowg force-pushed the invalid-block branch 3 times, most recently from 63ab2d6 to 8e90346 Compare January 29, 2026 16:03
@seadowg seadowg removed the blocked label Jan 30, 2026
return LiveDataUtils.zip(this, other)
}

fun <T, U> LiveData<T>.runningFold(initial: U, operation: (U, T) -> U): LiveData<U> {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'd probably have just referred to this as "fold", but on Flow that's used for an operation that waits for termination to give you a true fold of the whole stream - probably more correct. Good to be consistent between the two reactive types as well.

@seadowg seadowg marked this pull request as ready for review January 30, 2026 10:16
@seadowg seadowg requested a review from grzesiek2010 January 30, 2026 10:16
@grzesiek2010 grzesiek2010 merged commit fae66cc into getodk:master Jan 30, 2026
7 checks passed
@seadowg seadowg deleted the invalid-block branch January 30, 2026 13:44
@WKobus
Copy link

WKobus commented Feb 3, 2026

Tested with success

Verified on Android 16

Verified cases:

@srujner
Copy link

srujner commented Feb 3, 2026

Tested with success

Verified on Android 14

@dbemke
Copy link

dbemke commented Feb 3, 2026

Tested with success

Verified on Android 10

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.

Improve UX for geopoint/geoshape constraint violation

5 participants