From 22473d3615ecdf67fd8490eaae9e87aed9ebc5c9 Mon Sep 17 00:00:00 2001 From: ilkin-overleaf <100852799+ilkin-overleaf@users.noreply.github.com> Date: Wed, 20 Jul 2022 13:27:02 +0300 Subject: [PATCH] Merge pull request #8865 from overleaf/ii-mark-themes-as-legacy [web] Group themes list GitOrigin-RevId: 420572c678016c292a6dc04f409d0f3a0c824b60 --- .../src/Features/Project/ProjectController.js | 16 ++++++++++------ .../web/app/views/project/editor/left-menu.pug | 3 +++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index b34f00b345..b1e189acc2 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -1170,6 +1170,7 @@ const ProjectController = { languages: Settings.languages, learnedWords, editorThemes: THEME_LIST, + legacyEditorThemes: LEGACY_THEME_LIST, maxDocLength: Settings.max_doc_length, useV2History: project.overleaf && @@ -1442,17 +1443,23 @@ const defaultSettingsForAnonymousUser = userId => ({ }) const THEME_LIST = [ + 'cobalt', + 'dracula', + 'eclipse', + 'monokai', + 'overleaf', + 'textmate', +] + +const LEGACY_THEME_LIST = [ 'ambiance', 'chaos', 'chrome', 'clouds', 'clouds_midnight', - 'cobalt', 'crimson_editor', 'dawn', - 'dracula', 'dreamweaver', - 'eclipse', 'github', 'gob', 'gruvbox', @@ -1464,15 +1471,12 @@ const THEME_LIST = [ 'merbivore', 'merbivore_soft', 'mono_industrial', - 'monokai', 'nord_dark', - 'overleaf', 'pastel_on_dark', 'solarized_dark', 'solarized_light', 'sqlserver', 'terminal', - 'textmate', 'tomorrow', 'tomorrow_night', 'tomorrow_night_blue', diff --git a/services/web/app/views/project/editor/left-menu.pug b/services/web/app/views/project/editor/left-menu.pug index 13c2adf50e..5d0bbd4bc3 100644 --- a/services/web/app/views/project/editor/left-menu.pug +++ b/services/web/app/views/project/editor/left-menu.pug @@ -159,6 +159,9 @@ aside#left-menu.full-size( ) each editorTheme in editorThemes option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')} + option(value="—" disabled) ————————————————— + each editorTheme in legacyEditorThemes + option(value=editorTheme) #{editorTheme.replace(/_/g, ' ')} (Legacy) if (settings.overleaf != null && !isIEEE(brandVariation)) .form-controls