Use client-side viewer instead of _pdf.html.haml
Summary
As part of the effort of refactoring the repository browser into a Vue app, we need to use client-side blob viewers instead of haml-based blob viewers when viewing a file via the repository bowser.
For basic text files we should use Monaco in read only mode.
Note: Since this effort is behind a feature flag, do not remove the haml-based blob viewer as part of this issue, we will remove the unused code in a separate issue.
Improvements
- Performance:
- One Vue App for File viewing
- Much better caching as we cache in memory
- Offload the Code Highlighting/rendering to the Frontend (through Monaco)
- Potentially easier to incorporate more interactive viewers for each type of content
Risks
Blob viewers are an important part of the frontend and in some cases shared between multiple parts of the codebase. We need to be mindful of how the changes we make affects other parts of the frontend, it is advisable to gradually rollout this refactor behind a feature flag.
We should also be mindful of how this effort affects the overall performance of the repository browser.