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

Remove option to save geotrace as polygon #3078

Merged
merged 1 commit into from
May 22, 2019

Conversation

lognaturel
Copy link
Member

@lognaturel lognaturel commented May 20, 2019

Closes #1028, at long last. This simply removes the dialog which @zestyping has nicely isolated and commented as being destined for removal.

The meaningful changes are all in GeoPolyActivity. The other changes are for removing unused resources.

What has been done to verify that this works as intended?

From the All Widgets form, launched geotrace and verified that:

  • saving a blank trace still results in a blank value being written to the form instance
  • tapping the save button doesn't display a dialog, whether or not there are points to save
  • tapping the save button after entering a single point shows a toast error
  • tapping the save button after entering points saves that number of points
  • the first and last point saved are different

From the All Widgets form, launched geoshape and verified that:

  • saving a blank shape still results in a blank value being written to the form instance
  • tapping the save button doesn't display a dialog, whether or not there are points to save
  • tapping the save button after entering one or two points shows a toast error
  • tapping the save button after entering points saves that number of points
  • the first and last point saved are the same

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

This is a surgical removal so there aren't any real alternatives.

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 fully removes the ability to save a polygon using the geotrace widget. This means that users who rely on their enumerators picking trace or shape will need to redeploy their forms or block updates as described on the forum.

Although the intent is just to modify geotrace, code is shared between geotrace and geoshape so both are at risk of regressions. There's no risk that the change affects different Android versions differently so verification on one Android version should be enough.

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

All Widgets

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

getodk/docs#968

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • 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

@@ -29,6 +27,8 @@
import android.widget.Spinner;
import android.widget.TextView;

import androidx.annotation.VisibleForTesting;
Copy link
Member Author

Choose a reason for hiding this comment

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

This got reordered automatically by Android Studio because it went from an android. package to an androidx. package.

@yanokwa yanokwa added this to the v1.22 milestone May 21, 2019
@mmarciniak90
Copy link
Contributor

Tested with success

Case GeoTrace GeoShape
saving a blank trace/shape still results in a blank value being written to the form instance ✔️ ✔️
tapping the save button doesn't display a dialog, whether or not there are points to save ✔️ ✔️
tapping the save button after entering a single (Geotrace) point OR one or two points (GeoShape) shows a toast error ✔️ ✔️
tapping the save button after entering points saves that number of points ✔️ ✔️
the first and last point saved are different ✔️ -
the first and last point saved are the same - ✔️

Verified also:

  • removing response
  • removing single point
  • removing all points
  • update previously saved points
  • three methods of recording location

Verified on Android: 4.2, 4.4, 5.1, 6.0, 7.0, 8.1

@opendatakit-bot unlabel "needs testing"
@opendatakit-bot label "behavior verified"

@mmarciniak90
Copy link
Contributor

@opendatakit-bot label "behavior verified"

@grzesiek2010 grzesiek2010 merged commit aa5301c into getodk:master May 22, 2019
@lognaturel lognaturel deleted the remove-polygon branch May 22, 2019 21:02
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.

Geotrace widget should only capture lines, not polygons
5 participants