diff --git a/crates/mdbook-aquascope/src/preprocessor.rs b/crates/mdbook-aquascope/src/preprocessor.rs index 98d46f96d..cda901b8c 100644 --- a/crates/mdbook-aquascope/src/preprocessor.rs +++ b/crates/mdbook-aquascope/src/preprocessor.rs @@ -186,6 +186,9 @@ impl AquascopePreprocessor { // TODO: make this configurable add_data("no-interact", "true")?; + // TODO: add a code path to enable this from config + // add_data("show-bug-reporter", true)?; + write!(html, ">")?; Ok(html) diff --git a/frontend/packages/aquascope-embed/src/main.tsx b/frontend/packages/aquascope-embed/src/main.tsx index f76fe6d4f..9ea68ac39 100644 --- a/frontend/packages/aquascope-embed/src/main.tsx +++ b/frontend/packages/aquascope-embed/src/main.tsx @@ -179,6 +179,7 @@ window.initAquascopeBlocks = (root: HTMLElement) => { elem.classList.add(AQUASCOPE_NAME); let readOnly = elem.dataset.noInteract! === "true"; + let showBugReporter = elem.dataset.showBugReporter! === "true"; let computePermBtn: HTMLButtonElement | undefined; if (!readOnly) { @@ -200,7 +201,7 @@ window.initAquascopeBlocks = (root: HTMLElement) => { let initialCode = maybeParseJson(elem.dataset.code); if (!initialCode) throw new Error("Missing data-code attribute"); - if (window.telemetry) { + if (window.telemetry && showBugReporter) { let extraInfo = document.createElement("div"); elem.appendChild(extraInfo); ReactDOM.createRoot(extraInfo).render( @@ -232,7 +233,7 @@ window.initAquascopeBlocks = (root: HTMLElement) => { initialCode, err => { console.error(err); - }, + }, serverUrl, readOnly, shouldFailHtml,