From b1b117f83dd7c1f5ed89dabdabcea7ba74773845 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:18:20 -0400 Subject: [PATCH 1/2] Make it easier to override display-test-app configuration. --- .../display-test-app/src/frontend/DisplayTestApp.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test-apps/display-test-app/src/frontend/DisplayTestApp.ts b/test-apps/display-test-app/src/frontend/DisplayTestApp.ts index cec99d86ac96..da1be235f373 100644 --- a/test-apps/display-test-app/src/frontend/DisplayTestApp.ts +++ b/test-apps/display-test-app/src/frontend/DisplayTestApp.ts @@ -16,6 +16,7 @@ import { showStatus } from "./Utils"; import { Dock } from "./Window"; const configuration: DtaConfiguration = {}; + const getFrontendConfig = () => { if (ProcessDetector.isMobileAppFrontend) { if (window) { @@ -30,6 +31,18 @@ const getFrontendConfig = () => { } Object.assign(configuration, getConfig()); + + // Overriding the configuration used to require setting environment variables, rebuilding the app, and restarting the app from scratch - + // and sometimes that doesn't even work. + // If you want to quickly adjust aspects of the configuration, add your overrides below and just hot-reload the app in the browser/electron. + const configurationOverrides: DtaConfiguration = { + /* For example: + iModelName: "d:\\bim\\Constructions.bim", + disableInstancing: true, + */ + }; + Object.assign(configuration, configurationOverrides); + console.log("Configuration", JSON.stringify(configuration)); // eslint-disable-line no-console }; From 86df505cb9968ac712fa05f519a9a06dd1ab6568 Mon Sep 17 00:00:00 2001 From: Paul Connelly <22944042+pmconne@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:21:32 -0400 Subject: [PATCH 2/2] clarify. --- test-apps/display-test-app/src/frontend/DisplayTestApp.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test-apps/display-test-app/src/frontend/DisplayTestApp.ts b/test-apps/display-test-app/src/frontend/DisplayTestApp.ts index da1be235f373..0b2fc6d4c760 100644 --- a/test-apps/display-test-app/src/frontend/DisplayTestApp.ts +++ b/test-apps/display-test-app/src/frontend/DisplayTestApp.ts @@ -32,9 +32,10 @@ const getFrontendConfig = () => { Object.assign(configuration, getConfig()); - // Overriding the configuration used to require setting environment variables, rebuilding the app, and restarting the app from scratch - + // Overriding the configuration generally requires setting environment variables, rebuilding the app, and restarting the app from scratch - // and sometimes that doesn't even work. - // If you want to quickly adjust aspects of the configuration, add your overrides below and just hot-reload the app in the browser/electron. + // If you want to quickly adjust aspects of the configuration on the frontend, you can instead add your overrides below and just hot-reload the app in the browser/electron. + // Obviously, don't commit such changes. const configurationOverrides: DtaConfiguration = { /* For example: iModelName: "d:\\bim\\Constructions.bim",