-
-
Suggestion: we can bypass this ternary operation by using this message: "do(es) not exist." Not sure how people feel about that. Open to argument. In the event that we decide to keep the ternary, line 150 should be indented 4 spaces, not just 2. Also, maybe put a space between lines 150 and 151 to increase readability.
-
I don't know if we're still supporting IE, but I'm pretty sure IE *hates* trailing commas in Javascript.
Review draft, invalid user/group warning.
Review Request #1785 — Created Sept. 23, 2010 and submitted
This is addressing the issue here: http://code.google.com/p/reviewboard/issues/detail?id=1773 When creating a review draft, if a user or group doesn't exist, a message will notify the user of the error. Currently the invalid user or group would simply be removed. Message varies based on number of mistakes.
Manual testing. Tried editing everything on the draft page, seems to be working fine.
-
-
I think rather than a lightbox, I'd rather see a warning in red that appears inline in the page here and disappears either after a timeout or when the field is saved again. Lightboxes are great when there's a major error that prevents the user from proceeding, but they're a little overkill in this situation.
KF
- Change Summary:
-
Added inline error handling. Disappears after 6 seconds.
- Diff:
-
Revision 2 (+24 -1)
- Screenshots:
-
warning message
-
Kevin: Good stuff - just a few more minor notes/style suggestions. -Mike
-
I think there's a more jQuery-ish way of doing this, with: $('#message') .delay(6000) .fadeOut(400, function() { $(this).remove(); }); Not a big deal - just a suggestion. Also - it might be worth moving those magic numbers 6000 and 400 to some variables. I'm open to argument on that.
-
-
-
-
-
-
-
-
Given the color, this is more about errors than messages. Maybe name this something with "error" instead? Also, #message and #error are fairly generic, and IDs are limited to one per page, so maybe expand this to #review-request-error?
-
-
Should use the method that Mike mentioned. Functions in jQuery are chainable, so you can just stack the commands.
-
-
-
-
I think what I'd prefer here is to make a dedicated area for errors in the template, and just leave it blank by default. Then it's a simple matter to append to the ID for that area.
KF
- Change Summary:
-
Dedicated warning/error area. Using html()/hide() instead of prepend()/remove(). Style changes.
-
Kevin: Great job - the code looks good to me. I tried the patch out, and it works nicely - though if I decide to change the group/user list with something invalid, the dialog to publish a draft comes up, and pushes the warning further down the page where I'm less likely to notice it. Would it be better to move the warning somewhere above where the draft-publishing-dialog would appear, so as to be more visible/noticable? -Mike
-