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.
This makes a number of small usability fixes to the form page.
We weren't validating that a species had been selected. Now, we are:
The loading overlay was stuck to the top of the screen -- now, it's not*:
Before, we weren't catching errors from report submissions, but now we're displaying an (admittedly not-that-helpful) message to users:
*This required a pretty big re-work of the drawer logic due to a bug in material UI. I'm happy to discuss/revert if we think the priorities are different. The solution I have is definitely hacky. But it addresses a couple of issues with the way it was structured before as well 🤷♂.
More specifically, material UI doesn't handle
position: fixed
well inside of drawers. In order to get the submitting indicator to follow the page, it needs to be position:fixed. I tried the workaround here, but it didn't do the trick. I also tried something similar to this, but regardless of the z-level I chose, I couldn't get anything to show up in the drawer. What worked was removing the drawer altogether. Then, I had to add a little more logic intoMain.js
to make sure that the header/footer didn't show up, and hooked in the open/close buttons. The only thing we've lost functionally is the swiping-up animation. Please try it out and let me know what you think!This is a large change and I'd like your feedback -- I'm very open to ideas on how to do this with a smaller footprint