Skip to content

Commit

Permalink
Remove bug reporter for now
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Aug 28, 2024
1 parent 9ff42f0 commit 0ed9772
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions crates/mdbook-aquascope/src/preprocessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, "></div>")?;

Ok(html)
Expand Down
5 changes: 3 additions & 2 deletions frontend/packages/aquascope-embed/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -200,7 +201,7 @@ window.initAquascopeBlocks = (root: HTMLElement) => {
let initialCode = maybeParseJson<string>(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(
Expand Down Expand Up @@ -232,7 +233,7 @@ window.initAquascopeBlocks = (root: HTMLElement) => {
initialCode,
err => {
console.error(err);
},
},
serverUrl,
readOnly,
shouldFailHtml,
Expand Down

0 comments on commit 0ed9772

Please sign in to comment.