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

Do not allow to attach gifs in AnnotateWidget #5712

Merged
merged 2 commits into from
Sep 12, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Aug 22, 2023

Closes #5485

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

I've tested the fix manually and added automated tests.

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

In the issue, I said that a good solution would be to just update the intent that opens the file picker and filter available files excluding gifs so that only other types of images are visible to select. This would be a nice solution but error-prone because when we build such an intent it's not possible to exclude gifs, instead we would have to pass a list of supported mime types and easily miss something. A better solution in this case would be to still allow selecting gifs in the file picker but blocking attaching them in the widget.

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?

I think focusing on the fix should be enough. It shouldn't affect any other functionalities.

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:

  • 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

@grzesiek2010 grzesiek2010 marked this pull request as ready for review August 28, 2023 19:49
@dbemke
Copy link

dbemke commented Sep 12, 2023

Tested with Success!

Verified on Androids: 10

Verified cases:

A separate issue was filed for a crash after uploading a broken file to Annotate widget (present on the mastger version).

@srujner
Copy link

srujner commented Sep 12, 2023

Tested with Success!

Verified on Androids: 13

@grzesiek2010 grzesiek2010 merged commit d68c606 into getodk:master Sep 12, 2023
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.

Adding and trying to mark up a gif file in Annotate widget causes a crash
4 participants