Commit 1ab0072e authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '345812-highlightjs-feature-flag' into 'master'

Add a feature flag for syntax highlighting using HighlightJS

See merge request gitlab-org/gitlab!75005
parents 640e19a7 fa862485
...@@ -3,7 +3,7 @@ export const loadViewer = (type) => { ...@@ -3,7 +3,7 @@ export const loadViewer = (type) => {
case 'empty': case 'empty':
return () => import(/* webpackChunkName: 'blob_empty_viewer' */ './empty_viewer.vue'); return () => import(/* webpackChunkName: 'blob_empty_viewer' */ './empty_viewer.vue');
case 'text': case 'text':
return gon.features.refactorTextViewer return gon.features.highlightJs
? () => import(/* webpackChunkName: 'blob_text_viewer' */ './text_viewer.vue') ? () => import(/* webpackChunkName: 'blob_text_viewer' */ './text_viewer.vue')
: null; : null;
case 'download': case 'download':
......
...@@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController ...@@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController
before_action do before_action do
push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml) push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)
push_frontend_feature_flag(:refactor_text_viewer, @project, default_enabled: :yaml) push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml)
push_frontend_feature_flag(:consolidated_edit_button, @project, default_enabled: :yaml) push_frontend_feature_flag(:consolidated_edit_button, @project, default_enabled: :yaml)
push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks) push_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks)
end end
......
...@@ -35,7 +35,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -35,7 +35,7 @@ class ProjectsController < Projects::ApplicationController
before_action do before_action do
push_frontend_feature_flag(:lazy_load_commits, @project, default_enabled: :yaml) push_frontend_feature_flag(:lazy_load_commits, @project, default_enabled: :yaml)
push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml) push_frontend_feature_flag(:refactor_blob_viewer, @project, default_enabled: :yaml)
push_frontend_feature_flag(:refactor_text_viewer, @project, default_enabled: :yaml) push_frontend_feature_flag(:highlight_js, @project, default_enabled: :yaml)
push_frontend_feature_flag(:increase_page_size_exponentially, @project, default_enabled: :yaml) push_frontend_feature_flag(:increase_page_size_exponentially, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_dir_modal, @project, default_enabled: :yaml) push_frontend_feature_flag(:new_dir_modal, @project, default_enabled: :yaml)
end end
......
--- ---
name: refactor_text_viewer name: highlight_js
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70909 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75005
rollout_issue_url: rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/346257
milestone: '14.4' milestone: '14.6'
type: development type: development
group: 'group::source code' group: group::source code
default_enabled: false default_enabled: false
...@@ -98,7 +98,7 @@ describe('Blob content viewer component', () => { ...@@ -98,7 +98,7 @@ describe('Blob content viewer component', () => {
const findForkSuggestion = () => wrapper.findComponent(ForkSuggestion); const findForkSuggestion = () => wrapper.findComponent(ForkSuggestion);
beforeEach(() => { beforeEach(() => {
gon.features = { refactorTextViewer: true }; gon.features = { highlightJs: true };
isLoggedIn.mockReturnValue(true); isLoggedIn.mockReturnValue(true);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment