Page MenuHomePhabricator

Show file preview for file type parameters in VE
Open, Needs TriagePublicFeature

Assigned To
None
Authored By
ECohen_WMDE
Feb 5 2021, 11:42 AM
Referenced Files
F34092906: Portrait.png
Feb 5 2021, 11:42 AM
F34092907: Landscape.png
Feb 5 2021, 11:42 AM
F34092905: File not found.png
Feb 5 2021, 11:42 AM
F34092904: Audio.png
Feb 5 2021, 11:42 AM
F34092903: Video.png
Feb 5 2021, 11:42 AM
F34092902: Loading.png
Feb 5 2021, 11:42 AM

Description

Background
File preview confirms that the adding a file process was successful and helps users catch errors quickly and easily.

Requirements
Note: implementation matched the test instance.

  • Preview appears when adding a file name to the entry field via upload, search, or directly entering a correct file name
  • Preview disappears when the entry in the field is changed and therefore would no longer insert the file into the template on save
  • Image files (jpg, png) show thumbnail
  • PDFs, show symbol (match existing style)
  • Videos, show thumbnail from middle (match existing style)
  • Audio files, show icon (match existing style)
  • When no file is found (typo or otherwise), show no file found placeholder
  • While fetching the image, use the OOUI loading animation of three dots 25px x 25px. Background should be Base80 and take up same width as images: 120px x 80px.
  • When the image preview is clicked, the file's commons page opens in a new tab

Open questions

  • Can we show custom audio preview like in the below mock? (Design matches new Commons search - or will this happen automatically once this search becomes the default?)

Mocks

Loading.png (559×230 px, 8 KB)
Video.png (559×230 px, 27 KB)
Audio.png (559×186 px, 9 KB)
File not found.png (559×230 px, 9 KB)
Portrait.png (559×270 px, 22 KB)
Landscape.png (559×230 px, 28 KB)

For sizing and styling, re-use from test instance implementation.

Event Timeline

ECohen_WMDE renamed this task from DRAFT: Show file preview for file type parameters in VE to Show file preview for file type parameters in VE.Aug 11 2021, 2:00 PM
thiemowmde changed the subtype of this task from "Task" to "Feature Request".