Unify file previewers

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

We are introducing a number of file previewers. These all have (or rather, can have) a set of common methods that should be worked into a base class that can be extended.

Common behaviours:

  • Parse something with some imported parser
  • Render something with some renderer
  • Start spinner whilst parsing, stop spinner when rendering
  • Insert large previews with minimal perceived performance impact (lazy insertion)
  • Throw up a Flash error for previews that are too large and revert to raw download UI
  • Raw|Rendered toggle button gitlab-ce!10566
  • Advanced/Strech: Run parser on a web worker that communicates fluidly (stream-like) with the lazy document renderer.

I miss anything?

/cc @jschatz1 @iamphill @samrose3

Edited Sep 25, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading