Model and UI changes to enable attachments for binary diffs
Review Request #2651 — Created Oct. 9, 2011 and discarded
Changed FileAttachment model to enable per-diff attachments; Enabled simple UI for displaying image attachments;
Manually adding/changing db entries to create binary attachments and verifying displaying images from the diff viewer page.
Description | From | Last Updated |
---|---|---|
Trailing whitespace. |
chipx86 | |
Do we know that this field is necessary? |
chipx86 | |
Two blank lines between sections. The imports must be in alphabetical order. |
chipx86 | |
Trailing whitespace. Can you go through the rest of the file and fix those? |
chipx86 | |
Make sure all the HTML uses 1 space indenting. |
chipx86 | |
Indent any {% %} that controls logic flow (for loops, if statements) at indent level 0. Same with the ones … |
chipx86 | |
White space here too, and below on line 7. |
mike_conley | |
White space |
mike_conley | |
Hm - this could get confusing - there's already a "file" being used outside this loop scope. Is there another … |
mike_conley | |
Whitespace in this file too! |
mike_conley | |
whitespace |
mike_conley | |
I'm a bit wary of having the magic number 9 around. It should probably be assigned to a constant, or … |
mike_conley | |
I think we'll want this line indented enough so that the "m" of "max_length" is directly below the "_" of … |
mike_conley | |
Constant's are generally assigned to variables in all caps, so this should be: REVISION_PREFIX_COUNT |
mike_conley | |
Same as above. |
mike_conley | |
While I'm not going to ask you to get rid of all of the trailing whitespace in this file, I … |
mike_conley | |
Maybe wrap entire div with the ifequal statement rather than try to hide the div if the count 0. |
ME medanat | |
Add a single indent. |
ME medanat | |
Use class clearfix for this. |
ME medanat | |
Indent a single space. |
mike_conley |
- Change Summary:
-
Fixing the styles and removing unnecessary field in FileAttachment from my last change
-
Jacob: Thanks for your work here - just some whitespace that needs to be cleared, and I'm wondering about a magic number that's shown up. There were two issues that Christian brought up in his last review that haven't been addressed, it seems. Could you go back and fix those, or comment on why they don't need to be addressed? Also, could you attach a screenshot showing what this new bit to the diff fragment viewer looks like? Thanks, -Mike
-
-
-
-
Hm - this could get confusing - there's already a "file" being used outside this loop scope. Is there another variable name you could use instead?
- Diff:
-
Revision 4 (+81 -4)
- Change Summary:
-
Fixing formatting in code.
- Diff:
-
Revision 5 (+83 -4)
- Change Summary:
-
Fixing more formatting in code.
- Diff:
-
Revision 6 (+83 -4)
-
Hey Jacob: Just a few more formatting / style notes. I've found some lines where the indenting feels a little awkward, but I'm not 100% what the resolution is...maybe Christian, David, or one of the other developers have some input? Thanks for your work, -Mike
-
I think we'll want this line indented enough so that the "m" of "max_length" is directly below the "_" of "_(source file revision". That way, it's easier to tell that those items are within the parentheses following CharField.
-
I feel a bit funny about this indentation. Either the diff_source_revision line should be lined up directly underneath the "diff_source_file" parameter...or, if that causes us to be > 80 chars....I'm not sure. Not sure what the solution would be there. :/ At the very least, though, when in doubt, the indenting should be 4 spaces. Anyone have any input on what the right style would be here?
-
Constant's are generally assigned to variables in all caps, so this should be: REVISION_PREFIX_COUNT
-
Again, I feel funny about this indentation. I understand that we want to get these lines < 80 chars, but it makes it harder to tell that these diff_source_x params are within the parentheses following filter. Christian / David: do you have a preference?
-
-
While I'm not going to ask you to get rid of all of the trailing whitespace in this file, I don't think it's good to add to it either. The trailing whitespace should be removed from these lines.
-