Add text viewer feature flag
What does this MR do and why?
In #324326 (closed) we added a text viewer as part of the ongoing blob refactor.
Since then there has been a lot of discussions around whether we should render text files with monaco (currently refactored to use monaco), highlightjs, custom solution, or stick with Rogue (pre-refactor solution).
This MR adds ensures the text viewer is behind a feature flag and the legacy text viewer will be loaded if the feature flag is disabled.
Note: this change is part of a bigger effort to refactor the blob viewer.
Screenshots or screen recordings
No visual changes are expected.
How to set up and validate locally
This feature is behind the :refactor_blob_viewer
and :refactor_text_viewer
feature flag.
- run
rails c
in the project root - run
Feature.enable(:refactor_blob_viewer)
in the rails console - run
Feature.enable(:refactor_text_viewer)
in the rails console - upload a text file (e.g source code) to a repository
- view the uploaded file
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #340999 (closed)