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

bug/WG-449-Success-toast-with-error-msg #336

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

sophia-massie
Copy link
Contributor

@sophia-massie sophia-massie commented Feb 26, 2025

Overview:

Bug - success toast with error message when importing an asset to a feature with no asset

PR Status:

  • Ready.
  • Work in Progress.
  • Hold.

Related Jira tickets:

Summary of Changes:

  • Fixed notification.success for onError state
  • Angular/ Hazmapper prod allowed pngs assets to features but didn't actually work and import failed.
    • Removed this because geoapi doesn't allow png imports. See createFeatureAsset in geoapi/services/features.py. Geoapi will always return "Invalid format for feature assets" error message. Was png imports on prod ever working? Was this intended to work?

Testing Steps:

  1. On your own map, create a feature with no asset. Try importing geojson data from GEOAPI Test do not edit project
  2. Try importing a png file. Go to published data in file browser -> select PRJ - 1972 -> select San_Jac2.png and make sure that import is disabled.
  3. Check that png is no longer listed in the Allowed file types at the top of the modal
  4. Check code to see where there was a copy + paste error that told notification to show success style notification when error
  5. If you want to check what the error notification will look like, add png back to the Importable_feature_asset_types in fileUtils and try and import the same San_Jac2.png.

UI Photos:

Notes:

Copy link
Collaborator

@nathanfranklin nathanfranklin left a comment

Choose a reason for hiding this comment

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

LGTM. 👍


Was png imports on prod ever working?
Was this intended to work?

good catch on this. Now, I doubt it was ever working.

I was curious if our current workflow would "just work" for pngs as we aren't trying to read the jpg-only exif in this case. But it currently currently fails for converting png to jpeg using Pillow (OSError: cannot write mode RGBA as JPEG). so I assume that means it never worked.

@sophia-massie sophia-massie merged commit 3b52c30 into main Feb 28, 2025
5 checks passed
@sophia-massie sophia-massie deleted the bug/WG-449-Success-toast-with-error-msg branch February 28, 2025 14:40
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