Page MenuHomePhabricator

Roughly modularize document rendering in Files

Authored by epriestley on Mar 19 2018, 4:42 PM.



Ref T13105. This change begins modularizing document rendering. I'm starting in Files since it's the use case with the smallest amount of complexity.

Currently, we hard-coding the inline rendering for images, audio, and video. Instead, use the modular engine pattern to make rendering flexible and extensible.

There aren't any options for switching modes yet and none of the renderers do anything fancy. This API is also probably very unstable.

Test Plan

Viewwed images, audio, video, and other files. Saw reasonable renderings, with "nothing can render this" for any other file type.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Mar 19 2018, 4:42 PM
epriestley requested review of this revision.Mar 19 2018, 4:43 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mar 19 2018, 10:17 PM
This revision was automatically updated to reflect the committed changes.