Give file attachments an "Actions" menu.

Review Request #6352 — Created Sept. 21, 2014 and submitted

Information

Review Board
master
adfc169...

Reviewers

This change moves the "Add Comment" or "Review" items into an "Actions"
drop-down within the file attachment box. This is in preparation for adding an
"Update" action which will allow the user to replace an existing attachment
with a new version.

In order to make the drop-down not super ugly, I've changed the bottom-left
corner of the "Actions" label to be square instead of rounded.

  • Verified the visual appearance of the different menus, both as-is and with
    the "Update" button un-commented.
  • Checked that the actions still worked.

Description From Last Updated

The styling is very inconsistent across these. We should either add a style to the "Actions" when the menu is …

chipx86chipx86

Is this what we want in the menu? Or should we put Delete? I'm leaning toward Delete, since, like Update, …

chipx86chipx86

Can we keep the trash icon on delete? Might help keep the menu width a bit nicer (it seems very …

chipx86chipx86
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
brennie
  1. Ship It!

  2. 
      
justy777
  1. Ship It!

  2. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    The styling is very inconsistent across these. We should either add a style to the "Actions" when the menu is open to match, or keep the below more white-ish.

    1. The below is more white-ish. The grey is the active item (sorry that it's not really visible in these screenshots).

    2. Ah okay. Yeah, hard to tell here.

  3. Show all issues

    Is this what we want in the menu? Or should we put Delete? I'm leaning toward Delete, since, like Update, it's a thing we can do to manipulate the attachment. Users should probably still see Review/Add Comment directly.

    we can maybe rename "Add Comment" to just "Comment" to keep it short.

    Since that's still going to be long, though, how about we change "Actions" to just a down arrow, as the right-most entry? So:

    [Review] [v]
    
  4. 
      
david
reviewbot
  1. Tool: Pyflakes
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
    
    Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/rb/js/views/fileAttachmentThumbnailView.js
        reviewboard/static/rb/css/pages/reviews.less
        reviewboard/templates/reviews/parts/file_attachment_thumbnail.html
        reviewboard/static/rb/js/views/reviewRequestEditorView.js
    
    
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    Can we keep the trash icon on delete? Might help keep the menu width a bit nicer (it seems very small now).

    1. After trying this out, I think it looks pretty weird. We generally don't have icons next to any other commands.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (d4b2357)