Create a client-side solution for _download.html.haml blob viewer
Summary
As part of the effort of refactoring the repository browser into a Vue app, we need to add client-side blob viewers for our haml-based blob viewers.
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.