🏹🚆 Trainsformer Validations: Make sure all errors are reported to frontend#1354
Open
🏹🚆 Trainsformer Validations: Make sure all errors are reported to frontend#1354
Conversation
94dbfb2 to
9af52e1
Compare
9af52e1 to
3e78eef
Compare
firestack
commented
Feb 3, 2026
Comment on lines
312
to
319
| defp alert_message(%{data: data} = assigns) when not is_nil(data) do | ||
| ~H""" | ||
| {@message} | ||
| <ul> | ||
| <li :for={element <- @data}>{element}</li> | ||
| </ul> | ||
| """ | ||
| end |
Member
Author
There was a problem hiding this comment.
note: one issue I have with this implementation is that there's this undocumented/implicit behavior where if there's a metadata key that matches the key of the error/warning, it uses this implementation to render the contents nicely as a list.
I wanted to use translate_error/1 or some Gettext function to do this, but I haven't been able to figure out how to blend HTML/HEEx with Gettext so this was the best idea I could come up with :/
Member
Author
There was a problem hiding this comment.
I tried to make it a bit more clear with 704ecfa (this PR)
But that doesn't help with discoverability of the "convention" in export_upload.ex
3a41102 to
704ecfa
Compare
4 tasks
704ecfa to
d54c3bc
Compare
…ith list data to generic function
…ement case more clear
d54c3bc to
621fbc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Asana Ticket: 🏹🚆 Trainsformer Validations: Make sure all errors are reported to frontend
This is a somewhat large refactor of the way we're reporting errors and warnings from the
Arrow.Trainsformer.ExportUploadvalidation module, and howArrowWebTrainsformer pages use those errors & warnings.This change bundles reporting invalid CSV errors and reporting multiple errors and warnings at once because implementing multiple errors without also implementing changes on the other functions was a bit of a mess to manage multiple error "shapes" on top of the existing ways errors were reported.
I tried a few different ways of returning multiple errors & warnings to the frontend, and a few different ways of returning errors (4 element tuple for warnings & errors, rather than nested tuples) and I found that I think this is the implementation I favored the most in terms of friction and extensibility.
I tried to make the commits make logical sense in the order of refactors and changes, so you should be able to read the commits in order to understand the intention and reasoning.
Reviewer Checklist