From baf975e52d2fb2d0cb32aa331d8d90f720a45784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Rinc=C3=B3n=20Blanco?= Date: Sat, 29 Oct 2022 16:29:35 +0200 Subject: [PATCH] Fixes compiler init order by using initializeStateDependentProperties (#4210) The options were being properly passed in the state, but the UI was being initialized before the value was set to the member, causing it not to be displayed. Closes #4207 --- static/options.interfaces.ts | 9 ++++---- static/panes/compiler.ts | 43 +++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/static/options.interfaces.ts b/static/options.interfaces.ts index a1d6bf60e..374273552 100644 --- a/static/options.interfaces.ts +++ b/static/options.interfaces.ts @@ -22,7 +22,7 @@ // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. -import {Language} from '../types/languages.interfaces'; +import {Language, LanguageKey} from '../types/languages.interfaces'; import {CompilerInfo} from '../types/compiler.interfaces'; export type LibraryVersion = { @@ -51,12 +51,13 @@ export type LibsPerRemote = Record; export type Options = { libs: Libs; remoteLibs: LibsPerRemote; - languages: Record; + languages: Record; compilers: CompilerInfo[]; - defaultCompiler: Record; - defaultLibs: Record; + defaultCompiler: Record; + defaultLibs: Record; defaultFontScale: number; sentryDsn?: string; release?: string; sentryEnvironment?: string; + compileOptions: Record }; diff --git a/static/panes/compiler.ts b/static/panes/compiler.ts index 5b9b43265..040257a55 100644 --- a/static/panes/compiler.ts +++ b/static/panes/compiler.ts @@ -195,7 +195,7 @@ export class Compiler extends MonacoPane; private deferCompiles: boolean; @@ -314,23 +314,15 @@ export class Compiler extends MonacoPane