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) => {
case 'empty':
return () => import(/* webpackChunkName: 'blob_empty_viewer' */ './empty_viewer.vue');
case 'text':
return gon.features.refactorTextViewer
return gon.features.highlightJs
? () => import(/* webpackChunkName: 'blob_text_viewer' */ './text_viewer.vue')
: null;
case 'download':
......
......@@ -44,7 +44,7 @@ class Projects::BlobController < Projects::ApplicationController
before_action do
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_licensed_feature(:file_locks) if @project.licensed_feature_available?(:file_locks)
end
......
......@@ -35,7 +35,7 @@ class ProjectsController < Projects::ApplicationController
before_action do
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_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(:new_dir_modal, @project, default_enabled: :yaml)
end
......
---
name: refactor_text_viewer
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/70909
rollout_issue_url:
milestone: '14.4'
name: highlight_js
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/75005
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/346257
milestone: '14.6'
type: development
group: 'group::source code'
group: group::source code
default_enabled: false
......@@ -98,7 +98,7 @@ describe('Blob content viewer component', () => {
const findForkSuggestion = () => wrapper.findComponent(ForkSuggestion);
beforeEach(() => {
gon.features = { refactorTextViewer: true };
gon.features = { highlightJs: 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