Explorar el Código

Merge pull request #479 from sharelatex/as-rt-feature-flag

Switch to runtime flag for RT instead of feature flag
Alasdair Smith hace 8 años
padre
commit
f0bcb332bb

+ 1 - 0
services/web/app/coffee/Features/Project/ProjectController.coffee

@@ -301,6 +301,7 @@ module.exports = ProjectController =
 					themes: THEME_LIST
 					maxDocLength: Settings.max_doc_length
 					useV2History: !!project.overleaf?.history?.display
+					showRichText: req.query.rt == 'true'
 				timer.done()
 
 	_buildProjectList: (allProjects, v1Projects = [])->

+ 0 - 2
services/web/app/coffee/infrastructure/Features.coffee

@@ -14,8 +14,6 @@ module.exports = Features =
 				return Settings.enableGithubSync
 			when 'v1-return-message'
 				return Settings.accountMerge? and Settings.overleaf?
-			when 'rich-text'
-				return Settings.showRichText
 			when 'custom-togglers'
 				return Settings.overleaf?
 			else

+ 1 - 0
services/web/app/views/project/editor/editor.pug

@@ -39,6 +39,7 @@ div.full-size(
 			ace-editor="editor",
 			ng-if="!editor.richText",
 			ng-show="!!editor.sharejs_doc && !editor.opening",
+			style=showRichText ? "top: 40px" : "",
 			theme="settings.theme",
 			keybindings="settings.mode",
 			font-size="settings.fontSize",

+ 1 - 5
services/web/public/stylesheets/_style_includes.less

@@ -84,8 +84,4 @@
 @import	"../js/libs/pdfListView/TextLayer.css";
 @import	"../js/libs/pdfListView/AnnotationsLayer.css";
 @import	"../js/libs/pdfListView/HighlightsLayer.css";
-
-// CodeMirror
-& when (@show-rich-text) {
-  @import "vendor/codemirror.css";
-}
+@import "vendor/codemirror.css";

+ 2 - 7
services/web/public/stylesheets/app/editor.less

@@ -12,9 +12,7 @@
 @import "./editor/online-users.less";
 @import "./editor/hotkeys.less";
 @import "./editor/review-panel.less";
-& when (@show-rich-text) {
-	@import "./editor/rich-text.less";
-}
+@import "./editor/rich-text.less";
 
 @ui-layout-toggler-def-height: 50px;
 @ui-resizer-size: 7px;
@@ -82,10 +80,7 @@
 	.full-size;
 }
 
-#editor when (@show-rich-text = true) {
-	top: 40px; // TODO: replace with toolbar height var
-}
-#editor-rich-text when (@show-rich-text = true) {
+#editor-rich-text {
 	top: 40px; // TODO: replace with toolbar height var
 }