Add some polish to file attachment switching.
Review Request #8574 — Created Dec. 14, 2016 and submitted — Latest diff uploaded
This change does a few small things to polish up the next/previous file
attachments feature:
- Instead of just relying on
FileAttachment.__str__
, we use the
display_name
property for the caption. This will fall back on the filename
if no caption has been set. - The style for the next/previous switchers had a huge font size set, which
looked kind of goofy and didn't match what we had in the review request box. - We have a "dummy" file review UI for file attachments that aren't reviewable.
This had some code to set the caption in the review UI header in the case
where we were looking at a diff, but didn't set the caption when there was
only a single revision.
This dummy review UI is still pretty dumb, and should probably have some
indication that the file can't be displayed inline, along with a download
link, but that can come in some later change.
Switched around file attachments and saw that things looked better.