From 8ebdd2fdbdf328002121080edea75a320284e747 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 4 Aug 2019 06:37:25 +0500 Subject: [PATCH 1/4] feat: add reload btn in debugger ui --- .../commands/server/debugger-ui/index.html | 574 ++++++++++-------- 1 file changed, 320 insertions(+), 254 deletions(-) diff --git a/packages/cli/src/commands/server/debugger-ui/index.html b/packages/cli/src/commands/server/debugger-ui/index.html index a0ebbbd69..6c1531527 100644 --- a/packages/cli/src/commands/server/debugger-ui/index.html +++ b/packages/cli/src/commands/server/debugger-ui/index.html @@ -6,283 +6,349 @@ LICENSE file in the root directory of this source tree. --> - - - -React Native Debugger - - - + + + - - - -
- - -

- React Native JS code runs as a web worker inside this tab. -

-

Press ⌘⌥I to open Developer Tools. Enable Pause On Caught Exceptions for a better debugging experience.

-

You may also install the standalone version of React Developer Tools to inspect the React component hierarchy, their props, and state.

-

Status: Loading...

-
- - + return await window.deltaUrlToBlobUrl(localUrl); + } + })(); + + + + +
+ + +

+ React Native JS code runs as a web worker inside this tab. +

+

+ Press ⌘⌥I to open Developer + Tools. Enable + Pause On Caught Exceptions + for a better debugging experience. +

+

+ You may also install + the standalone version of React Developer Tools + to inspect the React component hierarchy, their props, and state. +

+

Status: Loading...

+ +
+ + From a94cd01e7e908c2138d9901bd0637f0586139f9f Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 4 Aug 2019 06:48:10 +0500 Subject: [PATCH 2/4] refactor: undo prettier formatting --- .../commands/server/debugger-ui/index.html | 587 ++++++++---------- 1 file changed, 267 insertions(+), 320 deletions(-) diff --git a/packages/cli/src/commands/server/debugger-ui/index.html b/packages/cli/src/commands/server/debugger-ui/index.html index 6c1531527..e63f48437 100644 --- a/packages/cli/src/commands/server/debugger-ui/index.html +++ b/packages/cli/src/commands/server/debugger-ui/index.html @@ -6,349 +6,296 @@ LICENSE file in the root directory of this source tree. --> - - - - React Native Debugger - - - - + + + - - - -
- - -

- React Native JS code runs as a web worker inside this tab. -

-

- Press ⌘⌥I to open Developer - Tools. Enable - Pause On Caught Exceptions - for a better debugging experience. -

-

- You may also install - the standalone version of React Developer Tools - to inspect the React component hierarchy, their props, and state. -

-

Status: Loading...

- -
- - + setTimeout(connectToDebuggerProxy, 500); + }; + + // Let debuggerWorker.js know when we're not visible so that we can warn about + // poor performance when using remote debugging. + document.addEventListener('visibilitychange', updateVisibility, false); + } + + connectToDebuggerProxy(); + + async function getBlobUrl(url) { + // Ensure that the bundle URL has the same origin as this webpage so that + // the same-origin policy lets us fetch it + const urlObject = new URL(url, location); + const relativeUrl = urlObject.pathname.replace('.bundle', '.delta') + + urlObject.search + + urlObject.hash; + const localUrl = new URL(relativeUrl, location).toString(); + + return await window.deltaUrlToBlobUrl(localUrl); + } +})(); + + + + +
+ + +

+ React Native JS code runs as a web worker inside this tab. +

+

Press ⌘⌥I to open Developer Tools. Enable Pause On Caught Exceptions for a better debugging experience.

+

You may also install the standalone version of React Developer Tools to inspect the React component hierarchy, their props, and state.

+

Status: Loading...

+ +
+ + From b3bba808dba774e6b5d43ca4e8c10e9352a77e77 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 4 Aug 2019 21:59:07 +0500 Subject: [PATCH 3/4] refactor: truncate reload-btn padding --- packages/cli/src/commands/server/debugger-ui/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/commands/server/debugger-ui/index.html b/packages/cli/src/commands/server/debugger-ui/index.html index e63f48437..e431d8f97 100644 --- a/packages/cli/src/commands/server/debugger-ui/index.html +++ b/packages/cli/src/commands/server/debugger-ui/index.html @@ -261,7 +261,7 @@ padding: 10px; } .reload-btn { - padding: 5px 10px 5px 10px; + padding: 5px 10px; } body.dark { background-color: #242424; From 1ea92bca1f2909b674230a4cc0bd07ab5f38d388 Mon Sep 17 00:00:00 2001 From: thecodrr Date: Sun, 4 Aug 2019 21:59:52 +0500 Subject: [PATCH 4/4] refactor: change reload btn text to "Reload app" --- packages/cli/src/commands/server/debugger-ui/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/src/commands/server/debugger-ui/index.html b/packages/cli/src/commands/server/debugger-ui/index.html index e431d8f97..b66d939f1 100644 --- a/packages/cli/src/commands/server/debugger-ui/index.html +++ b/packages/cli/src/commands/server/debugger-ui/index.html @@ -293,7 +293,7 @@

You may also install the standalone version of React Developer Tools to inspect the React component hierarchy, their props, and state.

Status: Loading...