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

3781 validating img #1383

Merged
merged 5 commits into from
Dec 4, 2019
Merged

3781 validating img #1383

merged 5 commits into from
Dec 4, 2019

Conversation

Angamanga
Copy link
Collaborator

@Angamanga Angamanga commented Nov 29, 2019

This pull request makes the following changes:

  • Moves the deletion of an image to the save-step instead of instant deletion. It prevents the scenario "if a user deletes an image, and then change their mind and leave without saving, their image is still deleted"

Testing checklist:

  • Select a post with an image

  • Delete the image

  • Do not save the post, navigate away or click cancel

  • Go to the post again, the image should still be there

  • Select the post again and edit it

  • Delete the image

  • Save the post

  • Go to the post again, the image is deleted!

  • Repeat above with a survey with several images

  • I certify that I ran my checklist

Fixes ushahidi/platform#3781 (part of it) .

Ping @ushahidi/platform

@Angamanga Angamanga requested a review from rowasc November 29, 2019 14:20
@@ -25,7 +25,7 @@ function (
template: require('./media.html'),
link: function ($scope, element, attr, ngModel) {
// Initialize media object
$scope.media = { id: null, file: null, caption: '', dataURI: null, changed: false };
$scope.media = { id: null, file: null, caption: '', dataURI: null, changed: false};
Copy link
Contributor

Choose a reason for hiding this comment

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

should this have a deleted: false as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, true, they should all be there for clarity. Added it now :)

@rowasc rowasc merged commit 50ca1dd into develop Dec 4, 2019
@rowasc rowasc deleted the 3781-validating-img branch December 4, 2019 14:55
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.

Uploading a large image to a post on a deployment
2 participants