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

Reworked the way we display images in ImageWidgets #5433

Merged
merged 5 commits into from
Mar 9, 2023

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Feb 3, 2023

Closes #5430

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

I've checked the fix manually and added some automated tests.

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

It seems to be a bug in Glide bumptech/glide#4035. I've improved the was we display/hide images so that the bug doesn't affect our app. I didn't think of any other solution.

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 may affect any image widget Image/Draw/Annotate/Signature so please test all of them.

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

The AllWidgets form.

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 February 6, 2023 20:55
@grzesiek2010 grzesiek2010 requested a review from seadowg February 10, 2023 10:54
@seadowg
Copy link
Member

seadowg commented Feb 14, 2023

@grzesiek2010 this needs conflicts resolved.

@grzesiek2010
Copy link
Member Author

@grzesiek2010 this needs conflicts resolved.

Done.

@seadowg seadowg requested review from lognaturel and removed request for seadowg March 3, 2023 17:15
Copy link
Member

@lognaturel lognaturel left a comment

Choose a reason for hiding this comment

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

As a bonus it makes the show/hide flow for error text clearer. Tests look complete to me.

@dbemke
Copy link

dbemke commented Mar 8, 2023

The "Markup image" button is enabled after adding an invalid image and there is a crash when a user taps the markup button. (Android 10,13)
Steps to reproduce:

  1. Go to Annotate widget in All widgets form.
  2. Tap "Choose image" button.
  3. Add the "broken" file mentioned in the issue.
  4. Tap "Markup Image" button.

@grzesiek2010
Copy link
Member Author

This is something we also should fix but it throws a different stacktrace so it's not the main issue I wanted to address. Please file a separate issue and we can add it to v2023.2.

@srujner
Copy link

srujner commented Mar 9, 2023

Tested with Success!

Verified on device with Android: 5.1, 12 and 13

Verified Cases:

@dbemke
Copy link

dbemke commented Mar 9, 2023

Tested with Success!

Verified on device with Android: 8.1, 10, 11

@grzesiek2010 grzesiek2010 merged commit 216d603 into getodk:master Mar 9, 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.

NullPointerException in BaseImageWidget
5 participants