Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 835923b

Browse files
committed
Address review comments.
- Exclude failing test. - Add full screen overlay on Live Preview close in browser.
1 parent 500e420 commit 835923b

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

src/LiveDevelopment/MultiBrowserImpl/protocol/remote/LiveDevProtocolRemote.js

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,42 @@
273273

274274
onClose: function () {
275275
// TODO: This is absolutely temporary solution.
276-
document.title = "(Brackets Live Preview has been closed) " + document.title;
276+
var body = document.getElementsByTagName("body")[0],
277+
overlay = document.createElement("div"),
278+
background = document.createElement("div"),
279+
status = document.createElement("div");
280+
281+
overlay.style.width = "100%";
282+
overlay.style.height = "100%";
283+
overlay.style.zIndex = 2227;
284+
overlay.style.position = "absolute";
285+
overlay.style.top = 0;
286+
overlay.style.left = 0;
287+
288+
background.style.backgroundColor = "#fff";
289+
background.style.opacity = 0.5;
290+
background.style.width = "100%";
291+
background.style.height = "100%";
292+
background.style.position = "absolute";
293+
background.style.top = 0;
294+
background.style.left = 0;
295+
296+
status.textContent = "Live Development Session has Ended";
297+
status.style.width = "100%";
298+
status.style.color = "#fff";
299+
status.style.backgroundColor = "#666";
300+
status.style.position = "absolute";
301+
status.style.top = 0;
302+
status.style.left = 0;
303+
status.style.padding = "0.2em";
304+
status.style.verticalAlign = "top";
305+
status.style.textAlign = "center";
306+
overlay.appendChild(background);
307+
overlay.appendChild(status);
308+
body.appendChild(overlay);
309+
310+
// change the title as well
311+
document.title = "(Brackets Live Preview: closed) " + document.title;
277312
},
278313

279314
setDocumentObserver: function (documentOberver) {

test/spec/LiveDevelopmentMultiBrowser-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*/
2323

24-
/*global define, describe, beforeEach, runs, afterEach, waitsFor, it, waitsForDone, expect */
24+
/*global define, describe, beforeEach, runs, afterEach, waitsFor, it, xit, waitsForDone, expect */
2525

2626
define(function (require, exports, module) {
2727
"use strict";
@@ -255,7 +255,7 @@ define(function (require, exports, module) {
255255
});
256256
});
257257

258-
it("should push in memory css changes made before the session starts", function () {
258+
xit("should push in memory css changes made before the session starts", function () {
259259
var localText,
260260
browserText;
261261

0 commit comments

Comments
 (0)