Summary:
DataDescriptor currently shows a pencil icon next to text values starting with http/https. This is because otherwise it wouldn't be possible to edit them as a click would open the link in a web browser instead of triggering the edit mode.
Because of how this logic is implemented, it doesn't take into account whether editmode is enabled or not, thus it shows the pencil icon even when there's no need for it (custom plugins with no edit mode).
## Changelog
Fixed pencil icon visible in DataInspector for non-editable text fields
Pull Request resolved: https://github.com/facebook/flipper/pull/1002
Test Plan:
I tested this locally with LayoutInspector and my own custom plugin. The pencil still appears and works in the LayoutInspector but doesn't show up anymore in my custom plugin as the data there is not editable
## Result after the fix:
**Editable (LayoutInspector)**

**Non-Editable (Custom Plugin)**

Reviewed By: passy
Differential Revision: D21400359
Pulled By: mweststrate
fbshipit-source-id: 62b18f3f6c75c1b07440d51fca363d7e6fc60c6a
Summary:
This diff removes a bunch of performance bottlenecks of `DataInspector`, mostly by making sure that non new data structures are send to children during rendering. For example, before this diff, fields like `expanded`, `ancestry` and `path` would always be freshly constructed, resulting in new data structures send down, causing the full json tree to always re-render.
By migrating to hooks this became a lot easy to manage.
Also fixed some other minor component reuse issues
Fixed rendering of recursive trees which was broken in the past, and added regression test
Fixed issue with uppercase search string causing unnecessary re-filtering
Make sure changing expand / collapse resets the filter
Reviewed By: passy
Differential Revision: D21381647
fbshipit-source-id: 72834e15088432f55b4b9c88f182ffc9908d4e49
Summary:
Introduced a highlight manager, which prevents drilling the highlight through the entire component tree and causing too many re-renders.
Also smartly optimizes that non-matched highlighted text doesn't render unnecessarily, and debounces the updates.
Finally, automatically scroll to the first highlight.
Reviewed By: jknoxville
Differential Revision: D21348575
fbshipit-source-id: 71f7ba2e981ad3fc1ea7f5e7043645e6b6811fb7
Summary:
Large GraphQL responses feel pretty unwieldy, added a search option.
Added filter functionality to ManagedDataInspector, and use it in GraphQL
changelog: It is now possible to search inside GraphQL responses
making it slightly more efficient, and scrolling to the matches will be done in a next diff
Reviewed By: jknoxville
Differential Revision: D21347880
fbshipit-source-id: 85c95be0964515e737de2ab41bbdd8cc6a87544e
Summary: Returning arrays from render kills react-reconciliation and produces missing key warnings. Turned all array rendering methods to use Fragments, where I could find them.
Reviewed By: jknoxville
Differential Revision: D21178253
fbshipit-source-id: 85ddf8adfa79732ccbe68409fdcf150399455983
Summary:
Quick notes:
- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.
Close https://github.com/facebook/flipper/pull/915
Reviewed By: jknoxville
Differential Revision: D20594929
fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
Summary:
1) moved "sonar/desktop/src" to "sonar/desktop/app/src", so "app" is now a separate package containing the core Flipper app code
2) Configured yarn workspaces with the root in "sonar/desktop": app, static, pkg, doctor, headless-tests. Plugins are not included for now, I plan to do this later.
Reviewed By: jknoxville
Differential Revision: D20535782
fbshipit-source-id: 600b2301960f37c7d72166e0d04eba462bec9fc1