From 05a2aae4071a09740445d87479c39300a2be90da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Fri, 19 Aug 2022 09:13:11 +0200 Subject: [PATCH] Move sass files to static/styles (#3971) Also hides the tab titles on text overflow --- .idea/scopes/Client.xml | 2 +- static/compiler-service.ts | 6 +++--- static/main.js | 2 +- static/{ => styles}/explorer.scss | 4 ++++ static/{ => styles}/themes/dark-theme.scss | 0 static/{ => styles}/themes/default-theme.scss | 0 6 files changed, 9 insertions(+), 5 deletions(-) rename static/{ => styles}/explorer.scss (99%) rename static/{ => styles}/themes/dark-theme.scss (100%) rename static/{ => styles}/themes/default-theme.scss (100%) diff --git a/.idea/scopes/Client.xml b/.idea/scopes/Client.xml index e656f0ee6..59a4d3044 100644 --- a/.idea/scopes/Client.xml +++ b/.idea/scopes/Client.xml @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/static/compiler-service.ts b/static/compiler-service.ts index a1b959723..adc693c8f 100644 --- a/static/compiler-service.ts +++ b/static/compiler-service.ts @@ -42,6 +42,8 @@ type CompilationStatus = { compilerOut: number; }; +const ASCII_COLORS_RE = new RegExp(/\x1B\[[\d;]*m(.\[K)?/g); + export class CompilerService { private readonly base = window.httpRoot; private allowStoreCodeDebug: boolean; @@ -429,11 +431,9 @@ export class CompilerService { const stdout = result.stdout ?? []; // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition const stderr = result.stderr ?? []; - // TODO: Make its own const variable at top of module? - const asciiColorsRe = new RegExp(/\x1B\[[\d;]*m(.\[K)?/g); function filterAsciiColors(line: ResultLine) { - return line.text.replace(asciiColorsRe, ''); + return line.text.replace(ASCII_COLORS_RE, ''); } const output = stdout.map(filterAsciiColors).concat(stderr.map(filterAsciiColors)).join('\n'); diff --git a/static/main.js b/static/main.js index 7b3417a6c..4c02fa8d6 100644 --- a/static/main.js +++ b/static/main.js @@ -66,7 +66,7 @@ require('bootstrap/dist/css/bootstrap.min.css'); require('golden-layout/src/css/goldenlayout-base.css'); require('tom-select/dist/css/tom-select.bootstrap4.css'); require('./colours.scss'); -require('./explorer.scss'); +require('./styles/explorer.scss'); // Check to see if the current unload is a UI reset. // Forgive me the global usage here diff --git a/static/explorer.scss b/static/styles/explorer.scss similarity index 99% rename from static/explorer.scss rename to static/styles/explorer.scss index b64f682d3..040896140 100644 --- a/static/explorer.scss +++ b/static/styles/explorer.scss @@ -570,6 +570,10 @@ kbd { height: 20px !important; } +li.lm_tab.lm_active { + overflow: hidden; +} + @media (max-width: 768px) { .lm_header { height: 50px !important; diff --git a/static/themes/dark-theme.scss b/static/styles/themes/dark-theme.scss similarity index 100% rename from static/themes/dark-theme.scss rename to static/styles/themes/dark-theme.scss diff --git a/static/themes/default-theme.scss b/static/styles/themes/default-theme.scss similarity index 100% rename from static/themes/default-theme.scss rename to static/styles/themes/default-theme.scss