Vote #78480
完了Preview files by default instead of downloading them
0%
説明
Through user research at "Planio":https://plan.io, we determined that users expect to preview file attachments (images, text, pdfs - see #22483) in a browser window rather than downloading them when they click.
The attached patch switches the default behaviour from downloading to previewing and it replaces the old magnifier icon (for previewing) with a disk icon (for downloading).
It also cleans up attachment display using the @attachments/links@ partial by displaying data in a borderless table format.
Here's a preview:
Current status:
!{width:600px}attachments_preview_download_old.png!
Proposed new status:
!{width:600px}attachments_preview_download_new.png!
journals
Since there’s a semantical difference between saving and downloading (saving to disk), I've introduced a new CSS class here (but I'm still using the same icon for now).
--------------------------------------------------------------------------------
+1 the default behaviour always throws me off.
--------------------------------------------------------------------------------
I think it is dangerous to place a download button just beside the delete button. Some user may accidentally delte files.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> I think it is dangerous to place a download button just beside the delete button. Some user may accidentally delte files.
Thank you for your feedback. I agree that might be the case. However, Redmine has already JS popups asking if files should _really_ be deleted. I also liked the fact that we place the icons next to each other, to make a clearer separation between text and icons.
Do you have a proposal where the icons would be better placed?
--------------------------------------------------------------------------------
Jan from Planio www.plan.io wrote:
> I also liked the fact that we place the icons next to each other, to make a clearer separation between text and icons.
>
> Do you have a proposal where the icons would be better placed?
I would rather prefer the position where the magnifier icon is placed in the current implementation, but I can understand what you said.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I agree. Putting the download buttons into a new column between file name and description might be the safer option.
--------------------------------------------------------------------------------
Thank you for your feedback, Go and Gregor. Holger and I played around with different layouts before I submitted the patch. We went for the current implementation because we felt it looks cleaner to have the two icons next to each other.
When placing the download icon next to the filename, you will either end up with three stacked columns of icons (paperclip, disk, and trashcan), or you re-introduce much of the current visual style which I find not very appealing due to its "ragged right" appearance.
Here are the two screenshots:
!{width:768px}three_columns.png!
_Cons: Three columns of icons_
!{width:768px}ragged_right.png!
_Cons: "Ragged right" appearance_
--------------------------------------------------------------------------------
Jan, thanks for testing UI variations. Now I have understood that the first UI is best.
I am setting target version to 3.4.0.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
I've committed the change with the download icons close to the filename, I find it more usable.
I prefer not to commit the first patch as attachments are not part of the files module. Having no tab selected is indeed not great but it would be much better to highlight the tab that correspond to the container of the attachment (eg. when previewing an issue attachment, the issue tab should be selected). I'll have a look at this.
--------------------------------------------------------------------------------
I noticed that attachment links in the following features should also lead to Preview page by default to increase consistency.
* File type custom field (#6719)
* Files column in issues list (#25515)
I wrote a patch to change the behavior: attachment:25988-format_object.diff
--------------------------------------------------------------------------------
Thanks.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,Closed,22481,Show thumbnails for PDF attachments
relates,Closed,26310,"attachment:filename" should generate a link to preview instead of download