critic
critic copied to clipboard
"Create Comment" dialog is slow to open and close
When adding a review issue by clicking a line, the dialog "Create Comment" does not appear immediately. It would be nice if it did. Further, when clicking "Add issue" or "Add note", it would be nice if the dialog disappeared immediately, but with an indicator somewhere showing that it's currently syncing with the server.
The reason it can take a little while for the dialog to appear is that I first check if the commented lines have already been modified by a later commit in the review, in which case you probably don't want to comment them. This could be done asynchronously, of course. Just a tad more complex to do that.
The reason the dialog doesn't disappear immediately is that if storing the comment on the server fails, it's not closed at all, allowing you to try again, or at least copy the text you wrote and store it somewhere else. The dialog could of course be re-opened if storing fails, but that has its own issues. Also, the indicator needs to be visible enough that the user is unlikely to leave or close the page before it's stored, to avoid data loss.
Yeah, the check for modifications is nice but shouldn't block me from starting the write my comment.
For the closing, I'm thinking the dialog could be "minimized" and moved to the left margin of the page (fixed positioning), which then goes away if the upload was successful or shows an error if it wasn't. Clicking it would bring back the dialog. To prevent data loss if the user leaves the page, it can try to store it client side with e.g. localStorage (can be done while typing the comment, even).
Some work on addressing this isuse: http://critic.whyi.org/r/11.