New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640696 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 640685



Sign in to add a comment

Quick View: Support for PDF Preview in Download/USB folders

Project Member Reported by weifangsun@chromium.org, Aug 24 2016

Issue description


Add the ability to preview a PDF file in Download folder via Quick View.
 

Comment 1 by oka@chromium.org, Aug 31 2016

Status: Assigned (was: Untriaged)
Labels: M55

Comment 3 by oka@chromium.org, Nov 30 2016

Labels: -M55 M57
I found we can support pdf file using webview.
https://drive.google.com/corp/drive/u/0/folders/0B7EYjkGAjRAhajk3MnZLZWNOaDQ
Does it look good?

Comment 4 by oka@chromium.org, Nov 30 2016

Status: Started (was: Assigned)
Cc: sgabr...@chromium.org
Labels: -M57 M-57
Nice! A few comments:

- I'm not 100% sure about the top title bar? It would be good for a user to be aware of which page they are previewing (I assume you navigate this via arrow up and down). However, the action items on the right hand side seem a little out of place?
- I also think we should remove the actions in the lower left hand corner.

Adding @sgabriel for comments as well.

Comment 6 by oka@chromium.org, Dec 1 2016

The pdf file is rendered by Chrome. The behaviour is the same as when you drag & drop a pdf file to Chrome tab.
So basically we cannot change the UI, like removing the lower right action buttons.

Comment 7 by oka@chromium.org, Dec 1 2016

One caveat I noticed is, we usually can use Space key to scroll down a pdf file, but for Quick View, it closes the window. It can be annoying, though I guess it's WAI.
User can use lower/upper arrow keys, but the it's scroll delta is smaller than the Space's.
For these type of file (.pdf and plain text), can we use the vertical space a bit more? In the spec attached, I limited the max height to 24px top and bottom from the app frame.


re-attaching updated mock.
21 QUICK VIEW - pdf.png
208 KB View Download

Comment 10 by oka@chromium.org, Dec 9 2016

What about the horizontal padding? Is 15% fine? To summarize,

Image, audio, video:
15% vertical and horizontal padding 

Pdf, text:
24px vertical padding and 15% horizontal padding?

Comment 11 by oka@chromium.org, Dec 13 2016

sgabriel@ I created a CL and took a screencast.
Could you double check if it looks fine?

pdf.webm
211 KB View Download
I like it a lot. Thanks!

Comment 13 by oka@chromium.org, Dec 15 2016

Thank you!
Project Member

Comment 14 by bugdroid1@chromium.org, Dec 15 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/885a00341b184c0daed52a7a7fb234f6f14638f6

commit 885a00341b184c0daed52a7a7fb234f6f14638f6
Author: oka <oka@chromium.org>
Date: Thu Dec 15 04:38:48 2016

Quick View: Support pdf and text preview.

This CL allows user to open files which are browsable on Chrome
on Quick View. Browsable files include pdf and text.
Screencast: https://bugs.chromium.org/p/chromium/issues/detail?id=640696#c11

BUG= 642713 , 640696 
TEST=manually tested the following:
- For pdf and text, preview with 24px of vertical margin appears.
- For image, video and audio, preview with 15% of vertical margin
appears as before.
- For .docx, 'no preview available' is shown as expected, though the
file type is 'document' which is the same as pdf.

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2540863004
Cr-Commit-Position: refs/heads/master@{#438744}

[modify] https://crrev.com/885a00341b184c0daed52a7a7fb234f6f14638f6/ui/file_manager/file_manager/foreground/elements/files_quick_view.css
[modify] https://crrev.com/885a00341b184c0daed52a7a7fb234f6f14638f6/ui/file_manager/file_manager/foreground/elements/files_quick_view.html
[modify] https://crrev.com/885a00341b184c0daed52a7a7fb234f6f14638f6/ui/file_manager/file_manager/foreground/elements/files_quick_view.js
[modify] https://crrev.com/885a00341b184c0daed52a7a7fb234f6f14638f6/ui/file_manager/file_manager/foreground/js/quick_view_controller.js

Comment 15 by oka@chromium.org, Dec 15 2016

Status: Fixed (was: Started)
Cc: dhadd...@chromium.org
Status: Assigned (was: Fixed)
Verified that quick preview of pdf/text files works in Downloads/USB folders.

Preview is not working in Drive folder.

Tested on build 9102.0.0, 57.0.2955.0.

Comment 17 by oka@chromium.org, Jan 12 2017

Description: Show this description

Comment 18 by oka@chromium.org, Jan 12 2017

Status: Fixed (was: Assigned)
Summary: Quick View: Support for PDF Preview in Download/USB folders (was: Quick View: Support for PDF Preview)
It's actually WAI. Supporting files in Drive folder is not easy, because externalfile: scheme is not whitelisted as safe scheme, and cannot open in webview.
schemes_okay_to_request_in_any_process_ in the url below contains {blob, chrome-extension, chrome-search, data, feed, filesystem, ftp, http, https, mailto, webcal}, but not externalfile.
https://cs.chromium.org/chromium/src/content/browser/child_process_security_policy_impl.cc?q=schemes_okay_to_request_in_any_process_&sq=package:chromium&dr=C&l=407

If Drive support is wanted, let's file a separate bug.

FYI - Support for Quick View on Drive is tracked under  crbug.com/625944 .
Status: Verified (was: Fixed)
Verified that quick preview of pdf/text files works in Downloads/USB folders.

ChromeOS 9202.0.0, 57.0.2984.0

Sign in to add a comment