Skip to content

Commit cbd1245

Browse files
devvaannshabose
authored andcommitted
feat: don't show status overlays as it was behaving unexpectedly
1 parent 7d4e856 commit cbd1245

2 files changed

Lines changed: 36 additions & 31 deletions

File tree

src/extensionsIntegrated/Phoenix-live-preview/main.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,11 @@ define(function (require, exports, module) {
269269

270270
$statusOverlayMessage.text(textMessage);
271271
$statusOverlay.data("status", status);
272-
$statusOverlay.removeClass("forced-hidden");
272+
273+
// @devansh - commenting this out to not show the status overlays, need to fix later
274+
// the issue is that status overlay - conneting status was never getting removed on devices with
275+
// slow connections or sites with heavy videos...
276+
// $statusOverlay.removeClass("forced-hidden");
273277
}
274278

275279
/**

test/spec/LiveDevelopmentMultiBrowser-test.js

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -343,36 +343,37 @@ define(function (require, exports, module) {
343343
await endPreviewSession();
344344
}, 30000);
345345

346-
it("should show error banner if there is syntax error in html", async function () {
347-
let savedText,
348-
curDoc;
349-
350-
await awaitsForDone(SpecRunnerUtils.openProjectFiles(["simple1.html"]),
351-
"SpecRunnerUtils.openProjectFiles simple1.html");
352-
353-
await waitsForLiveDevelopmentToOpen();
354-
355-
curDoc = DocumentManager.getCurrentDocument();
356-
savedText = curDoc.getText();
357-
// split file in half to and add syntax error then see if error banner shows up
358-
const mid = Math.ceil(savedText.length / 2);
359-
curDoc.setText(savedText.slice(0, mid));
360-
361-
await awaitsFor(
362-
function isBannerVisible() {
363-
return testWindow.$(".live-preview-status-overlay").is(":visible") &&
364-
testWindow.$(".live-preview-status-overlay").text()
365-
.includes(Strings.LIVE_DEV_STATUS_TIP_SYNC_ERROR);
366-
},
367-
"waiting for syntax error banner to appear",
368-
5000,
369-
50
370-
);
371-
372-
curDoc.setText(savedText);
373-
374-
await endPreviewSession();
375-
}, 30000);
346+
// @devansh: commenting out this test as we are not doing status overlays for now
347+
// it("should show error banner if there is syntax error in html", async function () {
348+
// let savedText,
349+
// curDoc;
350+
//
351+
// await awaitsForDone(SpecRunnerUtils.openProjectFiles(["simple1.html"]),
352+
// "SpecRunnerUtils.openProjectFiles simple1.html");
353+
//
354+
// await waitsForLiveDevelopmentToOpen();
355+
//
356+
// curDoc = DocumentManager.getCurrentDocument();
357+
// savedText = curDoc.getText();
358+
// // split file in half to and add syntax error then see if error banner shows up
359+
// const mid = Math.ceil(savedText.length / 2);
360+
// curDoc.setText(savedText.slice(0, mid));
361+
//
362+
// await awaitsFor(
363+
// function isBannerVisible() {
364+
// return testWindow.$(".live-preview-status-overlay").is(":visible") &&
365+
// testWindow.$(".live-preview-status-overlay").text()
366+
// .includes(Strings.LIVE_DEV_STATUS_TIP_SYNC_ERROR);
367+
// },
368+
// "waiting for syntax error banner to appear",
369+
// 5000,
370+
// 50
371+
// );
372+
//
373+
// curDoc.setText(savedText);
374+
//
375+
// await endPreviewSession();
376+
// }, 30000);
376377

377378
it("should make CSS-relative URLs absolute", async function () {
378379
var localText,

0 commit comments

Comments
 (0)