Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import React DevTools v4 #16381

Merged
merged 1,058 commits into from
Aug 28, 2019
Merged

Import React DevTools v4 #16381

merged 1,058 commits into from
Aug 28, 2019

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Aug 13, 2019

This PR imports the entire React DevTools v4 git repository (with history). I will manually migrate open issues after this PR has landed.

Despite its size, this PR is almost entirely additive:

$git diff master --name-status | grep -v "A"       
M	.circleci/config.yml
M	.eslintignore
M	.gitignore
M	package.json
M	packages/react-debug-tools/src/ReactDebugHooks.js
M	packages/react-devtools-core/package.json
M	packages/react-devtools-inline/package.json
M	packages/react-devtools/package.json
M	scripts/flow/config/flowconfig
M	scripts/jest/config.build.js
M	scripts/jest/config.source-persistent.js
M	scripts/jest/config.source.js
M	scripts/jest/preprocessor.js
M	scripts/print-warnings/print-warnings.js
M	yarn.lock

Checklist

  • Import (with history preserved)
  • Delete ReactDebugHooks fork (and use react-debug-tools)
  • Relocate unique dependencies to the appropriate package.json
  • Automated tests
    • Make sure all DevTools tests pass
    • Make sure CI runs DevTools tests also
  • Remove forked Flow types
  • Add copyright header to all files
  • Test builds and artifacts
    • react-devtools standalone app
    • react-devtools-core package
    • react-devtools-extensions (Chrome and Firefox)
    • react-devtools-inline package
    • react-devtools-shell test harness
  • Update outdated README instructions
  • Fix Now deployment script for demo shell

Folder structure

.
├── fixtures
│   ├── # (existing fixtures...)
│   └── devtools
│       ├── regression
│       └── standalone
└── packages
    ├── # (existing packages...)
    ├── react-devtools # Published to NPM
    ├── react-devtools-core # Published to NPM
    ├── react-devtools-extensions # Published to Chrome/Firefox stores
    │       ├── chrome
    │       ├── firefox
    │       └── shared
    ├── react-devtools-inline # Published to NPM
    ├── react-devtools-shared # Source for other DevTools packages
    └── react-devtools-shell # Dev app built with "react-devtools-inline"

Importing

The goal of this import is to preserve history from the DevTools v4 fork. Below are the steps I followed. Afterward, I verified that git log --follow worked as expected on imported files.

Prepare fork for merge

mkdir ~/Desktop/devtools-merge
cd ~/Desktop/devtools-merge

git init .
git commit -m "Initializing empty merge repo" --allow-empty  

git remote add -f fork [email protected]:bvaughn/react-devtools-experimental.git
git merge fork/master --allow-unrelated-histories

# Moved everything except "packages" into a new "extension" subdirectory
# to avoid merge conflicts with React repo folder structure

Import into React

cd ~/Documents/git/react

git remote add devtools-merge ~/Desktop/devtools-merge
git fetch devtools-merge

git checkout -b devtools-v4-merge
git merge --allow-unrelated-histories devtools-merge/master

git remote rm devtools-merge

Brian Vaughn and others added 30 commits June 2, 2019 21:01
1. Bugfix: Hide tree grouping/background coloring when inside of collapsed subtree.
2. Bugfix: Don't measure and udpate indentation when Components tab is hidden.
3. Tweak: Lower background color for selected subtree in light theme to increase contrast for text.
4. Tweak: Remove FB-specific displayName check/hack since we will address that by modifying the internal require JS transform.
As a result, paddings and sizes (e.g. tab bar heights) will also be impacted now by this preference. More importantly, Profile charts will also use the line height preference, so the 'comfortable' setting will hopefully make profiling data easier to read.
Components tree changes to improve HOCs and browsing deep trees
…js-yaml-3.13.1

Bump js-yaml from 3.12.1 to 3.13.1
* User profiling setting
* Background collects changed props/state (not added/removed or hooks yet)
* Tests updated
@bvaughn bvaughn changed the title Import React DevTools v4 [DO NOT MERGE] Import React DevTools v4 Aug 28, 2019
@bvaughn bvaughn merged commit b438699 into facebook:master Aug 28, 2019
@bvaughn bvaughn deleted the devtools-v4-merge branch August 28, 2019 14:35
@MichaelDeBoey
Copy link
Contributor

🎉🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.