diff --git a/frontend/common/Feedback.js b/frontend/common/Feedback.js index 0d074f2851..be44bcbb35 100644 --- a/frontend/common/Feedback.js +++ b/frontend/common/Feedback.js @@ -11,9 +11,9 @@ const init_firebase = async () => { firebase_load_promise = async(async () => { let [{ initializeApp }, firestore_module] = await Promise.all([ // @ts-ignore - import("https://www.gstatic.com/firebasejs/9.3.0/firebase-app.js"), + import("https://www.gstatic.com/firebasejs/10.8.0/firebase-app.js"), // @ts-ignore - import("https://www.gstatic.com/firebasejs/9.3.0/firebase-firestore.js"), + import("https://www.gstatic.com/firebasejs/10.8.0/firebase-firestore.js"), ]) let { getFirestore, addDoc, doc, collection } = firestore_module @@ -28,10 +28,11 @@ const init_firebase = async () => { let feedback_db = collection(db, "feedback") let add_feedback = async (feedback) => { - await addDoc(feedback_db, feedback) + let docref = await addDoc(feedback_db, feedback) + console.debug("Firestore doc created ", docref.id, docref) } - console.log("🔥base loaded") + console.log("🔥base loaded", { initializeApp, firestore_module, app, db, feedback_db, add_feedback }) // @ts-ignore return add_feedback @@ -44,6 +45,7 @@ export const init_feedback = async () => { try { // Only load firebase when the feedback form is touched const feedbackform = document.querySelector("form#feedback") + if (feedbackform == null) return feedbackform.addEventListener("submit", (e) => { const email = prompt("Would you like us to contact you?\n\nEmail: (leave blank to stay anonymous 👀)") @@ -51,12 +53,13 @@ export const init_feedback = async () => { async(async () => { try { + const feedback = String(new FormData(e.target).get("opinion")) + if (feedback.length < 4) return + let add_feedback = await init_firebase() await timeout_promise( add_feedback({ - // @ts-ignore - feedback: new FormData(e.target).get("opinion"), - // @ts-ignore + feedback, timestamp: Date.now(), email: email ? email : "", }), diff --git a/src/evaluation/MacroAnalysis.jl b/src/evaluation/MacroAnalysis.jl index 063623b6f4..cd7a6e2352 100644 --- a/src/evaluation/MacroAnalysis.jl +++ b/src/evaluation/MacroAnalysis.jl @@ -143,7 +143,7 @@ function resolve_topology( Failure(ErrorException("shutdown")) end catch error - @error "Macro call expansion failed with a non-macroexpand error" error + @error "Macro call expansion failed with a non-macroexpand error" exception=(error,catch_backtrace()) cell.code Failure(error) end if result isa Success diff --git a/src/notebook/path helpers.jl b/src/notebook/path helpers.jl index 9a3a387931..05093a8071 100644 --- a/src/notebook/path helpers.jl +++ b/src/notebook/path helpers.jl @@ -187,7 +187,7 @@ function tryexpanduser(path) end end -tamepath = abspath ∘ tryexpanduser +const tamepath = abspath ∘ tryexpanduser "Block until reading the file two times in a row gave the same result." function wait_until_file_unchanged(filename::String, timeout::Real, last_contents::String="")::Nothing diff --git a/test/frontend/helpers/pluto.js b/test/frontend/helpers/pluto.js index 6a92bd9d32..ea6ce564d1 100644 --- a/test/frontend/helpers/pluto.js +++ b/test/frontend/helpers/pluto.js @@ -139,9 +139,9 @@ const waitForPlutoBusy = async (page, iWantBusiness, options) => { await page.waitForFunction( (iWantBusiness) => { let quiet = //@ts-ignore - document?.body?._update_is_ongoing === false && + (document?.body?._update_is_ongoing ?? false) === false && //@ts-ignore - document?.body?._js_init_set?.size === 0 && + (document?.body?._js_init_set?.size ?? 0) === 0 && document?.body?.classList?.contains("loading") === false && document?.querySelector(`#process-status-tab-button.something_is_happening`) == null && document?.querySelector(`pluto-cell.running, pluto-cell.queued, pluto-cell.internal_test_queued`) == null