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

[Outreachy Task Submission]: Handle error message persistence for posts without images #934

Conversation

RWUBAKWANAYO
Copy link
Contributor

Description:

This pull request addresses the issue ushahidi/platform#4813 where an error message persisting when submitting a new post without uploading an image but adding an image caption. Additionally, even after removing the image caption, the error persisted, causing confusion for users.

Changes Made:

  • Updated the ImageUploaderComponent to accept form and key inputs.
  • Implemented error handling logic in the ImageUploaderComponent to display a clear pop-up message when users attempt to submit a post with an image caption but without uploading an image.
  • Modified the component to remove any persisted error when users remove the image caption.

Testing Checklist:

  1. Start the web app with npm run web:serve.
  2. Log in to an existing account or create a new account.
  3. Click on the "Add New Post" icon in the sidebar.
  4. Select a survey template that includes an option to upload an image.
  5. Verify that attempting to submit a post with an image caption but without uploading an image displays an error message and disables the submit button.
  6. Verify that removing the image caption removes any persisted error messages.
screen-recording-2024-03-22-at-052353_z6pX1QFm.mov

@Angamanga Angamanga self-requested a review March 24, 2024 17:38
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.

Nice catch! Looks good and works fine! Thank you for your contribution!

@Angamanga
Copy link
Contributor

@Angamanga To consider for next release

@Angamanga Angamanga closed this Oct 7, 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.

2 participants