Commit Graph
755 Commits
Author SHA1 Message Date
Brian Vaughn 2349f04478 Handle case where :root styles aren't (yet) applied when SettingsContext mounts
This fixes a possible bug in the inline shell where line-heights are NaN so the Tree (react-window List) gets created with a itemSize of NaN
2019-08-06 08:46:42 -07:00
Brian VaughnandGitHub dc8580e64d New NPM package react-devtools-inline (#363) 2019-08-05 10:09:26 -07:00
Sam HortonandBrian Vaughn 6f1e283b76 feat: match HOC display names during search (#360)
* feat: match HOC display names during search

* chore: update tests for new search logic
2019-08-05 09:44:48 -07:00
Brian VaughnandGitHub db8542ad97 Refactor inspect/select logic so that $r contains hooks data (#364)
* Refactor inspect/select logic so that  var contains hooks data
* Legacy renderer resets $r to null when inspecting non class/function element
2019-08-03 17:59:35 -07:00
Dominic GannawayandBrian Vaughn 644c9c4e1c [Flare] useListener -> useResponder (#362) 2019-08-02 10:14:25 -07:00
Brian Vaughn 9727f4e88f Don't let a DevTools or React internal error interfere with logging. 2019-08-02 09:39:39 -07:00
Brian Vaughn abbaedd264 Updated Flow type for DevTools tab id 2019-08-02 09:27:13 -07:00
Brian Vaughn aed31fdf12 Element keys are selectable text
Changed truncation to be CSS-driven, and enabled double-click selection of text, so that long keys could be copied from within the tree.
2019-07-31 14:48:39 -07:00
Brian Vaughn 271aa75cf2 Removed the Profiler screenshot capture feature
This wasn't reliable because of browser extension API limitations and required serious throttling to avoid harming performance, so I've decided to just remove it entirely for now.
2019-07-31 11:36:01 -07:00
Brian Vaughn 4f8b7864ee Add "Welcome to the new DevTools" notification
This dialog is shown in the browser extension the first time a user views v4. It is off by default for the standalone extension, but can be enabled via a public API.
2019-07-31 11:22:51 -07:00
Brian Vaughn 8e2134beee Re-add try/catch inside Agent's getIDForNode() 2019-07-28 08:42:21 -07:00
Philipp SpiessandBrian Vaughn 82881ab261 Allow Inspecting Elements Within Iframes (#355)
This change adds support for element inspecting within `<iframe/>`s.

The iframes are kept in a Set so that we only append listeners once and
clean them up properly. I’ve run a few tests and it seems to behave as
expected.

The fixture includes a cross-origin iframe to make sure we do not error
in this case.
2019-07-28 08:40:02 -07:00
Brian Vaughn ca4aac5014 Tweaked recent search changes
1. Compare element indices rather than ids (since these don't necessarily correlate)
2. Restored previous behaior when new search text reduces the number of results past the currently-selected element.
2019-07-27 09:15:53 -07:00
FannyandBrian Vaughn 29a6bf2a7b Feature: tweak search behaviour (#353)
Merge PR #353 from @fanny

This change changes search beahvior to initially select the result nearest the currently selected element (rather than selecting the first result in the set).
2019-07-27 09:04:20 -07:00
Brian Vaughn 1e8aa8105a Re-enable "view source" button for standalone shell
But only do this if we can verify the element file path. This hopefully avoids the case where clicking the button does nothing because of an invalid/incomplete path.
2019-07-25 09:28:45 -07:00
Brian Vaughn c6fb743910 Flow type cleanup 2019-07-25 09:13:45 -07:00
Dominic GannawayandBrian Vaughn a7948e8342 [Flare] Remove the old EventComponent/EventTarget system (#354) 2019-07-25 08:45:59 -07:00
Brian Vaughn 270f34f7f0 Support new Flare hook, unstable_useListener 2019-07-25 08:21:41 -07:00
Brian Vaughn 8d1c829019 Reverted style-prop hiding change because it caused a regression in the browser extension 2019-07-24 15:48:48 -07:00
Brian Vaughn 2e8b9fad36 Make style editor inputs more obvious resemble inputs 2019-07-24 14:43:29 -07:00
Brian Vaughn 4c610950a4 Hide "style" prop if we are showing the style editor
Also add react-native-web to test harness
2019-07-24 14:05:56 -07:00
Brian Vaughn 9a05e0b600 Disable view-source button in standalone mode if no project roots are provided 2019-07-24 13:36:51 -07:00
Brian Vaughn 722d366e9f Updated snapshot 2019-07-24 11:27:15 -07:00
Brian Vaughn f74c89b145 Misc improvements based on user feedback from Tim
* Added shadow to modals
* Change default "collapse new nodes" to be disabled rather than enabled
* Changed setting label "Collapse newly added components by default" to "Expand component tree by default"
* Change CSS media query for settings popup to show labels at smaller size
* Hide "Inspect the matching DOM element" button (since it doesnt really serve a purpose in standalone)
* Fixed small size bug for settings icon (viewbox of 20x20 instead of 24x24)
* bugfix: window.addEventListener/window.removeEventListener is not defined in Hermes.
2019-07-24 11:25:11 -07:00
Brian Vaughn 13959aa8fb Removed accidental log statement 2019-07-24 11:13:30 -07:00
Brian Vaughn 1178d57257 Fixed a module resolution issue and a syntax error from a bad merge 2019-07-23 07:46:19 -07:00
Brian VaughnandGitHub 4b34a77d29 Improve Bridge Flow types (#352)
* Updated local fork of react-window
* Updated Fow 97 -> 103
* Lint ignore NPM dist
* Improved Bridge Flow types
2019-07-20 14:08:23 -07:00
Brian Vaughn 33da657178 Make console override detectable (for RN YellowBox) 2019-07-20 08:05:08 -07:00
Brian Vaughn abe75b0e39 Slight tweak to avoid setting an invalid numeric value in props editor 2019-07-19 09:19:03 -07:00
Brian Vaughn f0a4b2f8e8 Merge branch 'fix-input-number-in-props' of https://github.com/koba04/react-devtools-experimental into koba04-fix-input-number-in-props 2019-07-19 09:16:26 -07:00
Brian Vaughn 0abaefb7c2 Cleanup legacy backend event listener if modern backend is detected 2019-07-19 09:02:30 -07:00
Brian Vaughn dbbf30a332 Make my code PRETTIER 2019-07-18 16:37:57 -07:00
Brian Vaughn 67e749a73a Tweaked modal font size style 2019-07-18 16:28:20 -07:00
Brian Vaughn bd0a0c58fd Tweaked modal title to better fit without wrapping 2019-07-18 16:26:27 -07:00
Brian Vaughn 249a2e043d Detect React Native v3 backend and show warning 2019-07-18 16:24:22 -07:00
Brian Vaughn 9fb753b5cd Hardened logic around when and how to patch console methods 2019-07-17 15:08:34 -07:00
Brian VaughnandGitHub cb3fb42129 Patch console to append component stacks (#348)
* Patch console.warn and console.error to auto-append owners-only component stacks.

This setting is enabled by default and will work for React Native even if no front-end DevTools shell is being used. The setting can be disabled via a new, persisted user preference though.
2019-07-17 11:12:39 -07:00
Toru Kobayashi 41c00cb0cb fix to input a number value to props 2019-07-14 23:11:08 +09:00
Brian VaughnandGitHub 0f2fb5badf Standalone NPM packages and React Native support (#335)
* Add version 4 react-devtools and react-devtools-core packages which support both React Native and e.g. Safari or iframe DOM usage.
* Replaces typed operations arrays with regular arrays in order to support Hermes. This is unfortunate, since in theory a typed array buffer could be more efficiently transferred between frontend and backend for the web extension, but this never actually worked properly in v8, only Spidermonkey, and it fails entirely in Hermes so for the time being- it's been removed.
* Adds support for React Native (paper renderer)
* Adds a style editor for react-native and react-native-web
2019-07-13 10:05:04 -07:00
Dominic Gannaway 89a0886872 [Flare] Update event component displayName 2019-06-19 17:43:15 +01:00
Brian Vaughn abc8ef3d5d Display unnamed custom hooks as 'Anonymous' 2019-06-18 11:37:29 -07:00
Brian Vaughn a2c79f2d9e Fixed hydration for events meta data 2019-06-18 10:50:19 -07:00
Brian Vaughn cf19916be7 Tweaked overflow check 2019-06-18 08:59:27 -07:00
Brian Vaughn 46def793de Merge branch 'when-render-hidden' of https://github.com/justingrant/react-devtools-experimental into justingrant-when-render-hidden 2019-06-18 08:52:08 -07:00
Brian Vaughn 6298fd4248 Hardened the hooks dehydration check 2019-06-18 08:47:37 -07:00
Brian Vaughn a56fd4c36d Tidied up. Added comments. Renamed a few things. 2019-06-18 08:40:58 -07:00
Brian Vaughn 8e3cd8ab1e Debounce inspect-element polling 2019-06-18 07:41:30 -07:00
Brian Vaughn 6c03f6abbd Tidied up a bit 2019-06-17 14:49:19 -07:00
Brian Vaughn d3d8a5d8b1 Hooks hydrate/dehydrate 2019-06-17 14:30:34 -07:00
Brian Vaughn 7a94ad4e8a Added props/state/context inspection to KeyValue 2019-06-17 11:30:53 -07:00