Skip to content

Highlight shape/trace and disable save button when invalid#7050

Merged
grzesiek2010 merged 12 commits intogetodk:masterfrom
seadowg:incremental-ux
Jan 28, 2026
Merged

Highlight shape/trace and disable save button when invalid#7050
grzesiek2010 merged 12 commits intogetodk:masterfrom
seadowg:incremental-ux

Conversation

@seadowg
Copy link
Member

@seadowg seadowg commented Jan 23, 2026

Work towards #6970

This felt like enough to merge and possibly go out as a beta - I'll follow up with the rest of the issue.

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?

As the title says this just adds the "invalid" style to traces and shapes (they should appear in red without the last point highlighted) and also disables the save button while constraints are violated. All three map engines should be working, but the changes are minimal so no need to dig in too deep.

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 changed the title Highlight shape/trace adn disable save button when invalid Highlight shape/trace and disable save button when invalid Jan 26, 2026
null
}

fun Int.opaque(): Int {
Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely useful to be able to use this for comparisons where the alpha doesn't matter.

fun getStrokeColor(): Int
}

fun TraceDescription.getMarkersForPoints(): List<MarkerDescription> {
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'm hoping we can do more and more of this: pull logic into the "view data" layer so that it can be shared between the map engines and allow them to be as thin as possible. Ideally they shouldn't care at all about state or display logic and just render things.

@seadowg seadowg requested a review from grzesiek2010 January 26, 2026 13:55
@seadowg seadowg marked this pull request as ready for review January 26, 2026 13:55
@grzesiek2010 grzesiek2010 merged commit 07ea70e into getodk:master Jan 28, 2026
7 checks passed
@seadowg seadowg deleted the incremental-ux branch January 28, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants