From db9e5c971507e40bdaa41468dde490949c84611f Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Thu, 15 Aug 2019 11:17:59 -0700 Subject: [PATCH] Updated all GitHub links to point to React repo --- CHANGELOG.md | 4 ++-- OVERVIEW.md | 2 +- README.md | 2 +- package.json | 2 +- packages/react-devtools-core/package.json | 2 +- packages/react-devtools-inline/package.json | 2 +- packages/react-devtools/package.json | 2 +- shells/browser/shared/deploy.html | 7 +++---- shells/utils.js | 8 +++++++- src/constants.js | 2 +- src/devtools/views/ErrorBoundary.js | 2 +- 11 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8604ca7a83efc..30209b7cc5d04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ #### Improved performance The legacy DevTools extension used to add significant performance overhead, making it unusable for some larger React applications. That overhead has been effectively eliminated in version 4. -[Learn more](https://github.com/bvaughn/react-devtools-experimental/blob/master/OVERVIEW.md) about the performance optimizations that made this possible. +[Learn more](https://github.com/facebook/react/blob/master/packages/react-devtools/OVERVIEW.md) about the performance optimizations that made this possible. #### Component stacks @@ -43,7 +43,7 @@ Filter preferences are remembered between sessions. #### No more in-line props -Components in the tree no longer show in-line props. This was done to [make DevTools faster](https://github.com/bvaughn/react-devtools-experimental/blob/master/OVERVIEW.md) and to make it easier to browse larger component trees. +Components in the tree no longer show in-line props. This was done to [make DevTools faster](https://github.com/facebook/react/blob/master/packages/react-devtools/OVERVIEW.md) and to make it easier to browse larger component trees. You can view a component's props, state, and hooks by selecting it: diff --git a/OVERVIEW.md b/OVERVIEW.md index b7ec0639ca9e0..7c8228791393a 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -229,7 +229,7 @@ Even when dealing with a single component, serializing deeply nested properties Hooks present a unique challenge for the DevTools because of the concept of _custom_ hooks. (A custom hook is essentially any function that calls at least one of the built-in hooks. By convention custom hooks also have names that begin with "use".) -So how does DevTools identify custom functions called from within third party components? It does this by temporarily overriding React's built-in hooks and shallow rendering the component in question. Whenever one of the (overridden) built-in hooks are called, it parses the call stack to spot potential custom hooks (functions between the component itself and the built-in hook). This approach enables it to build a tree structure describing all of the calls to both the built-in _and_ custom hooks, along with the values passed to those hooks. (If you're interested in learning more about this, [here is the source code](https://github.com/bvaughn/react-devtools-experimental/blob/master/src/backend/ReactDebugHooks.js).) +So how does DevTools identify custom functions called from within third party components? It does this by temporarily overriding React's built-in hooks and shallow rendering the component in question. Whenever one of the (overridden) built-in hooks are called, it parses the call stack to spot potential custom hooks (functions between the component itself and the built-in hook). This approach enables it to build a tree structure describing all of the calls to both the built-in _and_ custom hooks, along with the values passed to those hooks. (If you're interested in learning more about this, [here is the source code](https://github.com/facebook/react/blob/master/packages/react-debug-tools/src/ReactDebugHooks.js).) > **Note**: DevTools obtains hooks info by re-rendering a component. > Breakpoints will be invoked during this additional (shallow) render, diff --git a/README.md b/README.md index c9082991f42e3..b801681b7dcd9 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ yarn build:extension:firefox # builds at "shells/browser/firefox/build" # Support -As this extension is in a beta period, it is not officially supported. However if you find a bug, we'd appreciate you reporting it as a [GitHub issue](https://github.com/bvaughn/react-devtools-experimental/issues/new) with repro instructions. \ No newline at end of file +As this extension is in a beta period, it is not officially supported. However if you find a bug, we'd appreciate you reporting it as a [GitHub issue](https://github.com/facebook/react/issues/new?labels=Component:%20Developer%20Tools) with repro instructions. \ No newline at end of file diff --git a/package.json b/package.json index c0c5ffadc0dbc..5390e6efec893 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "build:extension:firefox:dev": "cross-env NODE_ENV=development node ./shells/browser/firefox/build", "build:standalone": "cd packages/react-devtools-core && yarn run build", "deploy": "yarn run deploy:demo && yarn run deploy:chrome && yarn run deploy:firefox", - "deploy:demo": "yarn run build:demo && cd shells/dev/ && now deploy && now alias react-devtools-experimental", + "deploy:demo": "yarn run build:inline && yarn run build:demo && cd shells/dev/ && now deploy && now alias react-devtools-experimental", "deploy:chrome": "node ./shells/browser/chrome/deploy", "deploy:firefox": "node ./shells/browser/firefox/deploy", "linc": "lint-staged", diff --git a/packages/react-devtools-core/package.json b/packages/react-devtools-core/package.json index 30b606d7285e2..d19284794e8f8 100644 --- a/packages/react-devtools-core/package.json +++ b/packages/react-devtools-core/package.json @@ -5,7 +5,7 @@ "license": "MIT", "main": "./dist/backend.js", "repository": { - "url": "https://github.com/bvaughn/react-devtools-experimental.git", + "url": "https://github.com/facebook/react.git", "type": "git" }, "files": [ diff --git a/packages/react-devtools-inline/package.json b/packages/react-devtools-inline/package.json index 2e6ddbe5c2789..79e4dde634a6d 100644 --- a/packages/react-devtools-inline/package.json +++ b/packages/react-devtools-inline/package.json @@ -5,7 +5,7 @@ "license": "MIT", "main": "./dist/backend.js", "repository": { - "url": "https://github.com/bvaughn/react-devtools-experimental.git", + "url": "https://github.com/facebook/react.git", "type": "git" }, "files": [ diff --git a/packages/react-devtools/package.json b/packages/react-devtools/package.json index 2ce188a47f7b7..81c99925b168e 100644 --- a/packages/react-devtools/package.json +++ b/packages/react-devtools/package.json @@ -4,7 +4,7 @@ "description": "Use react-devtools outside of the browser", "license": "MIT", "repository": { - "url": "https://github.com/bvaughn/react-devtools-experimental.git", + "url": "https://github.com/facebook/react.git", "type": "git" }, "bin": { diff --git a/shells/browser/shared/deploy.html b/shells/browser/shared/deploy.html index fa9a21b42fd12..f482711429f27 100644 --- a/shells/browser/shared/deploy.html +++ b/shells/browser/shared/deploy.html @@ -18,12 +18,11 @@

Created on %date% from - %commit% + %commit%

- This is a preview build of an unreleased DevTools extension. - It has no developer support. + This is a preview build of the React DevTools extension.

Installation instructions

@@ -34,7 +33,7 @@

Installation instructions

Bug reports

- Please report bugs as GitHub issues. + Please report bugs as GitHub issues. Please include all of the info required to reproduce the bug (e.g. links, code, instructions).

diff --git a/shells/utils.js b/shells/utils.js index 515f5c242b6a9..3e697ec2cf519 100644 --- a/shells/utils.js +++ b/shells/utils.js @@ -9,7 +9,12 @@ function getGitCommit() { } function getGitHubURL() { - // TODO potentially replace this with an fb.me URL (assuming it can forward the query params) + // HACK We are in the middle of migrating; + // For now, forcefully direct people to the new repository- + // even though we may be deploying from the old repo. + return 'https://github.com/facebook/react'; + + /* TODO potentially replace this with an fb.me URL (assuming it can forward the query params) const url = execSync('git remote get-url origin') .toString() .trim(); @@ -22,6 +27,7 @@ function getGitHubURL() { .replace('git@', 'https://') .replace('.git', ''); } + */ } function getVersionString() { diff --git a/src/constants.js b/src/constants.js index d27de3ed5bc40..734219da91bf8 100644 --- a/src/constants.js +++ b/src/constants.js @@ -26,7 +26,7 @@ export const LOCAL_STORAGE_SHOULD_PATCH_CONSOLE_KEY = export const PROFILER_EXPORT_VERSION = 4; export const CHANGE_LOG_URL = - 'https://github.com/bvaughn/react-devtools-experimental/blob/master/CHANGELOG.md'; + 'https://github.com/facebook/react/blob/master/packages/react-devtools/CHANGELOG.md'; // HACK // diff --git a/src/devtools/views/ErrorBoundary.js b/src/devtools/views/ErrorBoundary.js index c6cd9b16c1ff8..56a03012a7100 100644 --- a/src/devtools/views/ErrorBoundary.js +++ b/src/devtools/views/ErrorBoundary.js @@ -51,7 +51,7 @@ export default class ErrorBoundary extends Component { let bugURL = process.env.GITHUB_URL; if (bugURL) { const title = `Error: "${errorMessage || ''}"`; - const label = '😭 bug'; + const label = 'Component: Developer Tools'; let body = '\n'; body += '\n---------------------------------------------';