-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(TripPlan.InputForm): improve location validation + add visual error state #2365
Conversation
Also fix default fallback values for lat/lon/name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UX for this looks great!
I think it'd be worth having a test ensuring that there's an error when a location is invalid, and that there is no error when the location is just fully absent (I think that test would be at the Dotcom.TripPlan.InputForm
level?)
@joshlarson Great! I've added a test for the first thing; the second thing already has a test for no error when the location is fully absent! |
eeae30f
to
103a364
Compare
"to" => %{ | ||
"latitude" => "", | ||
"longitude" => "", | ||
"name" => Faker.Cat.breed(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐈⬛
Summary of changes
Asana Ticket: mostly TP | Add an error state when location isn't selected with some UI/UX | Trip Planner location input error state, should fix TP Bugs | Trip planner input location bug
Will be even better with #2364 and #2361 in the mix.
Key changes
:to
and:from
fields has been overhauled, and adds the error where neededMore changes
Dotcom.TripPlan.AntiCorruptionLayer
to not encode missing params as"nil"