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
For sizing and styling, re-use from test instance implementation.





