Skip to content

Conversation

@ushahidlee
Copy link
Contributor

@ushahidlee ushahidlee commented May 29, 2024

Issues:

This pull request fixes several issues that are found only in the mobile app:

  1. The app does not correctly handle multiple image uploads. The image in the last image field uploaded, replaces all of the previous image fields.
  2. There is no indication to a user that anything is happening when submitting a post. If the post contains multiple and/or large images that take time to upload, it can be a very long wait with no feedback to the user about the process until it is complete.
  3. The UI does not show the images that a user would like to upload, inside the post being submitted. It instead shows several broken images.

Solutions:

  1. Previously the app was only designed to handle one image per post, despite being capable of displaying a form that suggests it could handle multiple. Now each upload is handled individually and mapped correctly to the fields in the survey.
  2. There are now two new "in progress" indicators that have been added.
  1. The image handling now correctly encodes the image safely to be displayed in the app with no error. An additional image preview field that never showed anything has now been removed.

Testing:

  1. Open the mobile app and select a deployment.
  2. Create a post with a survey that has multiple image fields.
  3. Fill out the form selecting multiple images.
  4. Note that each image field correctly displays the image selected.
  5. Submit the post.
  6. Note the button is inactive with a spinner while the post is being submitted and the image uploads have progress indicators.
  7. Upon successful submission, view the submitted post. Note both images are correctly submitted.

Tickets:

https://linear.app/ushahidi/issue/USH-1189/submitting-post-with-multiple-image-upload-saves-same-image-for-all
https://linear.app/ushahidi/issue/USH-1198/slow-image-upload-causing-multiple-form-submissions-and-lack-of-user
https://linear.app/ushahidi/issue/USH-1329/no-previewthumbnails-when-adding-a-photo-in-mobile-app

@linear
Copy link

linear bot commented May 29, 2024

@ushahidlee ushahidlee requested a review from Angamanga May 31, 2024 15:26
@ushahidlee ushahidlee marked this pull request as ready for review May 31, 2024 15:26
Copy link
Contributor

@Angamanga Angamanga left a comment

Choose a reason for hiding this comment

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

Works fine now! I could not see any strange things happening on iPhone or Android so far so looks promising :)

CapacitorHttp: {
enabled: true,
enabled: false,
},
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@ushahidlee ushahidlee merged commit 88c1a38 into development Jun 5, 2024
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.

3 participants