-
Notifications
You must be signed in to change notification settings - Fork 9
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
Prevent upload modal & flash message from showing stale messages #550
Conversation
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.
LGTM; just a couple of informational questions
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.
minor quibbles about some test data naming and what I feel are some superfluous comments (I'm hearing Sandi Metz 'if you read the code, what would you say out loud?' and if it matches the comment, the comment can go?)
this.setState(newState) | ||
} | ||
|
||
// Returns a URL or an empty string | ||
humanReadableLocation = response => { |
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.
like this method naming.
If you're in a rush to merge, I can change to "approve" but I think the cleanup would help readability of tests and code. |
Fixes #534 This branch includes the following changes: * Reset messages and errors in `ImportResourceTemplate` component when HTTP response is successful * Reset messages when update handler is finished * Prevent users from dismissing flash message box, else it never comes back * Extract code to parse a response object into a human-friendly location into a new function in `ImportResourceTemplate` component * Add Babel plugin for optional chaining (as dev dependency) via the safe navigation (or "Elvis") operator * This lets us safely reach into objects such as HTTP responses without having to check at every level for `null` or `undefined`
96566df
to
afc9e90
Compare
Fixes #534
This branch includes the following changes:
ImportResourceTemplate
component when HTTP response is successfulImportResourceTemplate
componentnull
orundefined