Project

General

Profile

Actions

Feature #25988

closed

Preview files by default instead of downloading them

Added by Jan from Planio www.plan.io almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

Through user research at Planio, 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:

Proposed new status:


Files

attachments_preview_download_new.png (226 KB) attachments_preview_download_new.png Jan from Planio www.plan.io, 2017-05-17 16:00
attachments_preview_download_old.png (220 KB) attachments_preview_download_old.png Jan from Planio www.plan.io, 2017-05-17 16:00
0001-Highlight-Files-tab-when-viewing-attachments.patch (1.1 KB) 0001-Highlight-Files-tab-when-viewing-attachments.patch Jan from Planio www.plan.io, 2017-05-17 16:01
0002-Switch-default-behaviour-on-Attachment-click-to-view.patch (6.41 KB) 0002-Switch-default-behaviour-on-Attachment-click-to-view.patch Jan from Planio www.plan.io, 2017-05-17 16:01
0003-Use-new-icon-download-class-for-downloads.patch (3.57 KB) 0003-Use-new-icon-download-class-for-downloads.patch Jan from Planio www.plan.io, 2017-05-17 16:37
ragged_right.png (194 KB) ragged_right.png Jan from Planio www.plan.io, 2017-05-21 12:15
three_columns.png (191 KB) three_columns.png Jan from Planio www.plan.io, 2017-05-21 12:15
25988-format_object.diff (1.28 KB) 25988-format_object.diff Go MAEDA, 2017-06-11 07:02

Related issues

Related to Redmine - Feature #22481: Show thumbnails for PDF attachmentsClosedGo MAEDA

Actions
Related to Redmine - Defect #26310: "attachment:filename" should generate a link to preview instead of downloadClosedJean-Philippe Lang

Actions
Actions #1

Updated by Jan from Planio www.plan.io almost 7 years ago

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).

Actions #2

Updated by budo kaiman almost 7 years ago

+1 the default behaviour always throws me off.

Actions #3

Updated by Go MAEDA almost 7 years ago

I think it is dangerous to place a download button just beside the delete button. Some user may accidentally delte files.

Actions #4

Updated by Jan from Planio www.plan.io almost 7 years ago

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?

Actions #5

Updated by Go MAEDA almost 7 years ago

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.

Actions #6

Updated by Jan from Planio www.plan.io almost 7 years ago

  • Blocks Feature #25999: View repository content by default (instead of the history) added
Actions #7

Updated by Gregor Schmidt almost 7 years ago

I agree. Putting the download buttons into a new column between file name and description might be the safer option.

Actions #8

Updated by Jan from Planio www.plan.io almost 7 years ago

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:


Cons: Three columns of icons


Cons: "Ragged right" appearance

Actions #9

Updated by Go MAEDA almost 7 years ago

  • Target version changed from Candidate for next minor release to 3.4.0

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.

Actions #10

Updated by Go MAEDA almost 7 years ago

  • Related to Feature #22481: Show thumbnails for PDF attachments added
Actions #11

Updated by Jean-Philippe Lang almost 7 years ago

  • Blocks deleted (Feature #25999: View repository content by default (instead of the history))
Actions #12

Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

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.

Actions #13

Updated by Go MAEDA almost 7 years ago

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: 25988-format_object.diff

Actions #14

Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from Reopened to Closed

Thanks.

Actions #15

Updated by Go MAEDA almost 7 years ago

  • Related to Defect #26310: "attachment:filename" should generate a link to preview instead of download added
Actions

Also available in: Atom PDF