Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier to override display-test-app configuration. #3400

Merged
merged 3 commits into from
Mar 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test-apps/display-test-app/src/frontend/DisplayTestApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { showStatus } from "./Utils";
import { Dock } from "./Window";

const configuration: DtaConfiguration = {};

const getFrontendConfig = () => {
if (ProcessDetector.isMobileAppFrontend) {
if (window) {
Expand All @@ -30,6 +31,19 @@ const getFrontendConfig = () => {
}

Object.assign(configuration, getConfig());

// 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 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",
disableInstancing: true,
*/
};
Object.assign(configuration, configurationOverrides);

console.log("Configuration", JSON.stringify(configuration)); // eslint-disable-line no-console
};

Expand Down