Commit Graph

3751 Commits

Author SHA1 Message Date
Michel Weststrate
55b6b021f1 Fix QPL layout regeression
Summary:
Fixed the layout usage in QPL, the `horizontal` was correct, but the elements where swapped (the table was supposed to take all remaining size, and sidebar it's needed space, rather than the reverse).

Made this more explicit in the Layout component, by splitting it up in `Layout.(Top|Left|Right|Bottom)`, so that one has to make an explicit choice here, making it less error prone.

Reviewed By: passy

Differential Revision: D21572438

fbshipit-source-id: 29aa3462a3c96d048825be3157730e26182cb2fa
2020-05-19 11:51:21 -07:00
dependabot-preview[bot]
fcb4bb0874 Bump eslint-plugin-react from 7.16.0 to 7.20.0 in /desktop (#1174)
Summary:
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.16.0 to 7.20.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/yannickcr/eslint-plugin-react/releases">eslint-plugin-react's releases</a>.</em></p>
<blockquote>
<h2>v7.20.0</h2>
<h3>Added</h3>
<ul>
<li>support eslint v7 (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2635">#2635</a>[] <a href="https://github.com/ljharb">ljharb</a>, <a href="https://github.com/toshi-toma">toshi-toma</a>)</li>
<li>[<code>forbid-component-props</code>][]/[<code>forbid-dom-props</code>][]: Allow a custom message with forbid props (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2615">#2615</a>[] <a href="https://github.com/mtamhankar1">mtamhankar1</a>)</li>
<li>[<code>jsx-no-literals</code>][]: add <code>ignoreProps</code> option to ignore props validation (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2146">#2146</a>[] <a href="https://github.com/iiison">iiison</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>[<code>jsx-sort-props</code>][]: only use localeCompare when case is ignored (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2556">#2556</a>[] <a href="https://github.com/tanmoyopenroot">tanmoyopenroot</a>)</li>
<li>[<code>jsx-key</code>][]: add a failing test case for optional chaining (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2610">#2610</a>[] <a href="https://github.com/JonathanLee-LX">JonathanLee-LX</a>)</li>
<li>[<code>no-unused-state</code>][]: handle optional chaining (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2588">#2588</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[<code>jsx-pascal-case</code>][]: Do not consider namespaces when checking for DOM (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2638">#2638</a>[] <a href="https://github.com/yacinehmito">yacinehmito</a>)</li>
<li>[<code>jsx-curly-spacing</code>][], [<code>jsx-no-bind</code>][], <code>usedPropTypes</code> util: avoid node.start and node.end ([25b1936][] <a href="https://github.com/toshi-toma">toshi-toma</a>)</li>
<li>[<code>jsx-no-target-blank</code>][]: allow <code>no-referrer</code> without <code>noopener</code> by default (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2043">#2043</a>[] <a href="https://github.com/seancrater">seancrater</a>)</li>
<li>[<code>button-has-type</code>][]: improve message when non-static value is used ([aecff62][] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[<code>no-adjacent-inline-elements</code>][]: prevent crash on nullish children (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2621">#2621</a>[] <a href="https://github.com/Rogdham">Rogdham</a>)</li>
<li>[<code>prop-types</code>][]: avoid crash when spreading any type (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2606">#2606</a>[] <a href="https://github.com/golopot">golopot</a>))</li>
<li>[<code>require-render-return</code>][]: add missing &quot;a&quot; (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2604">#2604</a>[] <a href="https://github.com/leothorp">leothorp</a>)</li>
<li>[<code>jsx-no-comment-textnodes</code>][]: fix for <code>typescript-eslint/parser</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2601">#2601</a>[] <a href="https://github.com/Axnyff">Axnyff</a>)</li>
<li>[<code>displayName</code>][]: avoid a crash when using React.memo (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2587">#2587</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
</ul>
<h3>Docs</h3>
<ul>
<li>Clean up examples in rule docs (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2546">#2546</a>[] <a href="https://github.com/silvenon">silvenon</a>)</li>
<li>[readme] Add Rules of Hooks to Other useful plugins section (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2633">#2633</a>[] <a href="https://github.com/petetnt">petetnt</a>)</li>
<li>[<code>no-this-in-sfc</code>][]: backtick <code>this</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2616">#2616</a>[] <a href="https://github.com/mrflip">mrflip</a>)</li>
<li>[<code>function-component-definition</code>][]: Fix unnamedComponents option examples (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2608">#2608</a>[] <a href="https://github.com/vkrol">vkrol</a>))</li>
</ul>
<h3>Changed</h3>
<ul>
<li>[Deps] Move &quot;semver&quot; to devDependencies (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2595">#2595</a>[] <a href="https://github.com/rajivshah3">rajivshah3</a>)</li>
<li>[eslint] remove <code>operator-linebreak</code> override (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2578">#2578</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Tests] <code>button-has-type</code>: ensure no mistakenly allowed identifiers named <code>button</code>/<code>submit</code>/<code>reset</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2625">#2625</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Tests] <code>displayName</code>: add a test case (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2593">#2593</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Dev Deps] update <code>types/eslint</code>, <code>types/estree</code>, <code>types/node</code>, <code>typescript-eslint/parser</code>, <code>coveralls</code>, <code>eslint-config-airbnb-base</code>, <code>eslint-plugin-import</code>, <code>typescript</code></li>
</ul>
<p><a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2638">#2638</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2638">yannickcr/eslint-plugin-react#2638</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2635">#2635</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2635">yannickcr/eslint-plugin-react#2635</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2633">#2633</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2633">yannickcr/eslint-plugin-react#2633</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2625">#2625</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2625">yannickcr/eslint-plugin-react#2625</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2621">#2621</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2621">yannickcr/eslint-plugin-react#2621</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2616">#2616</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2616">yannickcr/eslint-plugin-react#2616</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2615">#2615</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2615">yannickcr/eslint-plugin-react#2615</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2610">#2610</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2610">yannickcr/eslint-plugin-react#2610</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2608">#2608</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2608">yannickcr/eslint-plugin-react#2608</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2606">#2606</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2606">yannickcr/eslint-plugin-react#2606</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2604">#2604</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2604">yannickcr/eslint-plugin-react#2604</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2601">#2601</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2601">yannickcr/eslint-plugin-react#2601</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2595">#2595</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2595">yannickcr/eslint-plugin-react#2595</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2593">#2593</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2593">yannickcr/eslint-plugin-react#2593</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2588">#2588</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2588">yannickcr/eslint-plugin-react#2588</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2587">#2587</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2587">yannickcr/eslint-plugin-react#2587</a></p>
</tr></table> ... (truncated)
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md">eslint-plugin-react's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/yannickcr/eslint-plugin-react/compare/v7.19.0...v7.20.0">7.20.0</a> - 2020-05-12</h2>
<h3>Added</h3>
<ul>
<li>support eslint v7 (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2635">#2635</a>[] <a href="https://github.com/ljharb">ljharb</a>, <a href="https://github.com/toshi-toma">toshi-toma</a>)</li>
<li>[<code>forbid-component-props</code>][]/[<code>forbid-dom-props</code>][]: Allow a custom message with forbid props (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2615">#2615</a>[] <a href="https://github.com/mtamhankar1">mtamhankar1</a>)</li>
<li>[<code>jsx-no-literals</code>][]: add <code>ignoreProps</code> option to ignore props validation (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2146">#2146</a>[] <a href="https://github.com/iiison">iiison</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>[<code>jsx-sort-props</code>][]: only use localeCompare when case is ignored (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2556">#2556</a>[] <a href="https://github.com/tanmoyopenroot">tanmoyopenroot</a>)</li>
<li>[<code>jsx-key</code>][]: add a failing test case for optional chaining (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2610">#2610</a>[] <a href="https://github.com/JonathanLee-LX">JonathanLee-LX</a>)</li>
<li>[<code>no-unused-state</code>][]: handle optional chaining (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2588">#2588</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[<code>jsx-pascal-case</code>][]: Do not consider namespaces when checking for DOM (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2638">#2638</a>[] <a href="https://github.com/yacinehmito">yacinehmito</a>)</li>
<li>[<code>jsx-curly-spacing</code>][], [<code>jsx-no-bind</code>][], <code>usedPropTypes</code> util: avoid node.start and node.end ([25b1936][] <a href="https://github.com/toshi-toma">toshi-toma</a>)</li>
<li>[<code>jsx-no-target-blank</code>][]: allow <code>no-referrer</code> without <code>noopener</code> by default (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2043">#2043</a>[] <a href="https://github.com/seancrater">seancrater</a>)</li>
<li>[<code>button-has-type</code>][]: improve message when non-static value is used ([aecff62][] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[<code>no-adjacent-inline-elements</code>][]: prevent crash on nullish children (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2621">#2621</a>[] <a href="https://github.com/Rogdham">Rogdham</a>)</li>
<li>[<code>prop-types</code>][]: avoid crash when spreading any type (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2606">#2606</a>[] <a href="https://github.com/golopot">golopot</a>))</li>
<li>[<code>require-render-return</code>][]: add missing &quot;a&quot; (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2604">#2604</a>[] <a href="https://github.com/leothorp">leothorp</a>)</li>
<li>[<code>jsx-no-comment-textnodes</code>][]: fix for <code>typescript-eslint/parser</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2601">#2601</a>[] <a href="https://github.com/Axnyff">Axnyff</a>)</li>
<li>[<code>displayName</code>][]: avoid a crash when using React.memo (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2587">#2587</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
</ul>
<h3>Docs</h3>
<ul>
<li>Clean up examples in rule docs (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2546">#2546</a>[] <a href="https://github.com/silvenon">silvenon</a>)</li>
<li>[readme] Add Rules of Hooks to Other useful plugins section (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2633">#2633</a>[] <a href="https://github.com/petetnt">petetnt</a>)</li>
<li>[<code>no-this-in-sfc</code>][]: backtick <code>this</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2616">#2616</a>[] <a href="https://github.com/mrflip">mrflip</a>)</li>
<li>[<code>function-component-definition</code>][]: Fix unnamedComponents option examples (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2608">#2608</a>[] <a href="https://github.com/vkrol">vkrol</a>))</li>
</ul>
<h3>Changed</h3>
<ul>
<li>[Deps] Move &quot;semver&quot; to devDependencies (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2595">#2595</a>[] <a href="https://github.com/rajivshah3">rajivshah3</a>)</li>
<li>[eslint] remove <code>operator-linebreak</code> override (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2578">#2578</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Tests] <code>button-has-type</code>: ensure no mistakenly allowed identifiers named <code>button</code>/<code>submit</code>/<code>reset</code> (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2625">#2625</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Tests] <code>displayName</code>: add a test case (<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2593">#2593</a>[] <a href="https://github.com/golopot">golopot</a>)</li>
<li>[Dev Deps] update <code>types/eslint</code>, <code>types/estree</code>, <code>types/node</code>, <code>typescript-eslint/parser</code>, <code>coveralls</code>, <code>eslint-config-airbnb-base</code>, <code>eslint-plugin-import</code>, <code>typescript</code></li>
</ul>
<p><a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2638">#2638</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2638">yannickcr/eslint-plugin-react#2638</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2635">#2635</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2635">yannickcr/eslint-plugin-react#2635</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2633">#2633</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2633">yannickcr/eslint-plugin-react#2633</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2625">#2625</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2625">yannickcr/eslint-plugin-react#2625</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2621">#2621</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2621">yannickcr/eslint-plugin-react#2621</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2616">#2616</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2616">yannickcr/eslint-plugin-react#2616</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2615">#2615</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2615">yannickcr/eslint-plugin-react#2615</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2610">#2610</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2610">yannickcr/eslint-plugin-react#2610</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2608">#2608</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2608">yannickcr/eslint-plugin-react#2608</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2606">#2606</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2606">yannickcr/eslint-plugin-react#2606</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2604">#2604</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2604">yannickcr/eslint-plugin-react#2604</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2601">#2601</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2601">yannickcr/eslint-plugin-react#2601</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2595">#2595</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2595">yannickcr/eslint-plugin-react#2595</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2593">#2593</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2593">yannickcr/eslint-plugin-react#2593</a>
<a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2588">#2588</a>: <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/pull/2588">yannickcr/eslint-plugin-react#2588</a></p>
</tr></table> ... (truncated)
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="25bf6cc486"><code>25bf6cc</code></a> Update CHANGELOG and bump version</li>
<li><a href="2598b1ee64"><code>2598b1e</code></a> [Dev Deps] update <code>types/eslint</code>, <code>types/estree</code>, <code>types/node</code>, `typescri...</li>
<li><a href="f94d851c80"><code>f94d851</code></a> [Fix] <code>jsx-sort-props</code>: only use localeCompare when case is ignored</li>
<li><a href="c481a26164"><code>c481a26</code></a> [Docs] Clean up examples in rule docs</li>
<li><a href="88d404d463"><code>88d404d</code></a> [eslint] remove <code>operator-linebreak</code> override</li>
<li><a href="304590a7ab"><code>304590a</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/yannickcr/eslint-plugin-react/issues/2635">#2635</a> from ljharb/eslint7</li>
<li><a href="35030a0819"><code>35030a0</code></a> [Tests] fix mistaken error property and add output property</li>
<li><a href="906b474cb5"><code>906b474</code></a> [New] support eslint v7</li>
<li><a href="d66f467d60"><code>d66f467</code></a> [Fix] <code>jsx-key</code>: add a failing test case for optional chaining</li>
<li><a href="da7a0458d4"><code>da7a045</code></a> [Fix] <code>no-unused-state</code>: handle optional chaining</li>
<li>Additional commits viewable in <a href="https://github.com/yannickcr/eslint-plugin-react/compare/v7.16.0...v7.20.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=eslint-plugin-react&package-manager=npm_and_yarn&previous-version=7.16.0&new-version=7.20.0)](https://dependabot.com/compatibility-score/?dependency-name=eslint-plugin-react&package-manager=npm_and_yarn&previous-version=7.16.0&new-version=7.20.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1174

Reviewed By: nikoant

Differential Revision: D21625528

Pulled By: cekkaewnumchai

fbshipit-source-id: 7e1abb1143c0261b46106f947094d75b56875f9c
2020-05-19 10:56:44 -07:00
Chaiwat Ekkaewnumchai
9ae0511f16 Refactor Data Used And Passed to Detail Sidebar
Summary:
As suggested in the previous diff, I change the way to store row values. Now, (kinda) raw values are stored instead of processed values that can be used directly for `ManagedTable`. This simplifies logic in detail sidebar.

I'm not sure what the effect to performance.

Reviewed By: mweststrate

Differential Revision: D21621896

fbshipit-source-id: 472be3caa955ca32f876f81095af21e9c17cb159
2020-05-19 09:12:56 -07:00
Chaiwat Ekkaewnumchai
11b233b516 Allow Long Text to Be Shown in The Sidebar
Summary:
This allows long text to be seen on the sidebar in database plugin. Also, remove weird padding in the sidebar and separate sidebar component to a new file

Refactoring is in the next diff

Reviewed By: mweststrate

Differential Revision: D21550672

fbshipit-source-id: 3e80be16783719e18392fe3d8f8068caf9283f8f
2020-05-19 09:12:56 -07:00
generatedunixname89002005306973
4e618198cb Flipper Release: v0.43.0
Summary: Releasing version 0.43.0

Reviewed By: cekkaewnumchai

Differential Revision: D21639652

fbshipit-source-id: 5a775f6361283b2e9b2540b054afad497dab2a22
2020-05-19 08:00:52 -07:00
Michel Weststrate
d103c218d2 automatically plugin directory to Flipper config on init
Summary: Freshly init-ed plugins are not picked up by Flipper if they are not on the search path. This diff checks if the current dir is on the search path, and, if not, suggests to add it.

Reviewed By: jknoxville

Differential Revision: D21619632

fbshipit-source-id: b1dbe2695dbee9ce537999dc83e36f969ba4b747
2020-05-19 05:33:35 -07:00
Michel Weststrate
49b4022228 added tests for generated template files
Summary:
Created a test that snapshots the generated files, so that we can capture accidental regressions when generating files.

Also made the package id to package name a bit more robust

Reviewed By: jknoxville

Differential Revision: D21619633

fbshipit-source-id: 88ffb127e050d840df9ccd4b15ba29a71f341975
2020-05-19 05:33:35 -07:00
Michel Weststrate
3f86c9f6d2 init should always create a directory
Summary:
Although there are tools that do this for you (create-react-app, react-native), and other that assume you are already in the created directory before you invoke the command (typescript, git), creating the directory by the tool has a few benefits:

1. less risk of making an accidental mess when people assume they don't need to create the dir first (I definitely ended up with a node_modules in the wrong directory)
1. it provide a naive way of detecting plugin name conflicts early (at least for plugins you create yourself)
1. in the next diff I'll add a pkg suggestion to add the current directory to the search path for flipper plugins. In the current setup, that would require needing to suggest to add the parent directory, which somehow feels less logical
2. makes sure that the directory name follows npm conventions: the package.json name should match the current directory name (not super important, but e.g VSCode will show warnings otherwise)

Reviewed By: jknoxville

Differential Revision: D21619631

fbshipit-source-id: 6d027ad18f14659e0347a66cacf056eacbc65680
2020-05-19 05:33:35 -07:00
Michel Weststrate
080085e788 added simple watch mode
Summary:
Added a watch mode to the bundle command of flipper plugins. This makes it easy to test develop plugins locally, even when you are using a production build of flipper, which lowers the barrier of developing / fixing plugins.

opted for `fs.watch` over watchman to avoid some overengineering:
1. pkg / pkg-lib don't have the watchman utilities that would be needed for this. I wasn't sure if I could move those over from `static` without breaking the bootstrapping process
2. watchman is often a nuisance on non FB machines that aren't set up for it. fs.watch in contrast doesn't have any further dependencies or setup requirements, and is much more likely to work ootb.
3. since we watch only the `src` folder we don't really need the watchman optimizations. (so for a package.json change people would have to restart, but I don't think that is much of a problem).

Reviewed By: jknoxville

Differential Revision: D21523814

fbshipit-source-id: b1de72b7d01c6fc50cb8ce5709f54f8019eb89e4
2020-05-19 05:33:34 -07:00
Michel Weststrate
1e309abe4f add react types to template
Summary: See previous diff, should have merged those two diffs

Reviewed By: jknoxville

Differential Revision: D21523815

fbshipit-source-id: 3db91d06d845f0764e28f0dbf3020e77812cde53
2020-05-19 05:33:34 -07:00
Michel Weststrate
8d6ad59c52 add tsconfig to template
Summary: When opening a freshly generated plugin in VScode the IDE would be full of errors, even though it can bundle correctly thanks to the defaults used by bundle. This  is fixed by diff by correctly setting up a tsconfig.

Reviewed By: jknoxville

Differential Revision: D21523817

fbshipit-source-id: 8f6b58fbfb704460ddb5b845ddfb137b28d37187
2020-05-19 05:33:33 -07:00
Michel Weststrate
47f72e3332 add build command by default
Summary: By adding a build command the flipper plugin can be picked up, even when using a production build of Flipper, as we don't require Flipper's own infrastructure anymore to compile plugins.

Reviewed By: jknoxville

Differential Revision: D21523819

fbshipit-source-id: eed935ee95a7e3bff2ace629836b4b2450b5d1ad
2020-05-19 05:33:33 -07:00
Michel Weststrate
310a76d03f Improve standard view template
Summary:
As soon as any data was send to a freshly generated plugin, the plugin would crash as React doesn't support directly rendering data. Replaced it with a poor mans rendering that simply dumps all the data we received.

Also made sure the view is scrollable now which wasn't the case before.

Reviewed By: jknoxville

Differential Revision: D21523816

fbshipit-source-id: 3e04799facdf8b66ce9d66217a47fc7826d58d43
2020-05-19 05:33:33 -07:00
Michel Weststrate
7536c0e930 Add default .gitignore file
Summary:
This stack contains a bunch of improvements I made to smoothen the demo of plugin creating in the Flipper + React Native talk.

With 98% likelihood people will manage the source code of their Flipper plugins in git. This will make sure the `.gitignore` is configured properly ootb

Reviewed By: nikoant

Differential Revision: D21523818

fbshipit-source-id: b2ed769edc8fb9fd320464b05686e817e438f21e
2020-05-19 05:33:32 -07:00
Roi Becker
436159eb22 Pigeon plugin
Summary:
Very similar to the Logview plugin, showing a table with all logs (from all clients, if more than one is connected to Unity), and a right-side panel for details (the extra).

I'm still thinking how can I display the extra in the table (so it will be more convenient to compare logs), but still don't know (each extra can have different fields), and this is a good starting point.

Note: the POI plugin has an option to display marauder data, but I received requests for an easy way to debug just Pigeon, and since this is simple enough I don't see the harm here.

Reviewed By: timur-valiev

Differential Revision: D21549233

fbshipit-source-id: e7a48b4e21711bc9454e9b87a312e94a662917e2
2020-05-16 03:09:53 -07:00
Chaiwat Ekkaewnumchai
8fa03789d1 Add Coverage Test for MultipleSelectorSection
Summary:
To comply with recent agreement, coverage test for MultipleSelectorSection is added.

Also, add undefined check in `elements.tsx` found while adding the test

Reviewed By: mweststrate

Differential Revision: D21554782

fbshipit-source-id: 7cd868bf16f6105d6f523048f29bdaa052837f45
2020-05-15 12:49:28 -07:00
Pascal Hartig
a65b6025c1 Report failures on snapshot taking
Summary: Suggested in D21571294.

Reviewed By: jknoxville

Differential Revision: D21594146

fbshipit-source-id: 1dcc310343788aecced724282d74e0cf08688220
2020-05-15 07:09:53 -07:00
Rick Hanlon
e3202dfb35 Add survey banner for Hermes Debugger
Summary:
As requested by the Hermes team, this adds an internal-only banner linking to a survey for the debugger (controlled by a GK).

Gatekeeper: https://our.intern.facebook.com/intern/gatekeeper/projects/flipper_plugin_hermes_debugger_survey/

Reviewed By: mweststrate

Differential Revision: D21556848

fbshipit-source-id: df34f49f504d11bba622709df86c8475be2433eb
2020-05-15 05:19:01 -07:00
Rick Hanlon
e23acc6f04 Switch flipper-out-of-contents-container to absolute position
Summary:
This diff updated the `flipper-out-of-contents` container to render with absolute position, which allows it to cover up all of the content in the plugin. This fixes an issue where content that exists in the plugin can be broken.

For example, the banner in the next diff would look like this:

{F237034745}

Reviewed By: mweststrate

Differential Revision: D21556849

fbshipit-source-id: 95ec4aac24ac995bd1c558123ef5da6087a40d0a
2020-05-15 05:19:01 -07:00
Pascal Hartig
d6844faebb Restore open behavior on screenshot capture
Summary: The effect of opening the screenshot after capturing was removed in D19765926.

Reviewed By: mweststrate

Differential Revision: D21571294

fbshipit-source-id: f3308d80e066cc01786c17323e4ff5f97c092de9
2020-05-15 04:54:24 -07:00
Pascal Hartig
7492e781d3 Change LowPassFilter invariant use
Summary:
Ugh, lockdown brain. This was supposed to be included in the test I added before
to get to 100% coverage. Well, it's here now.

Reviewed By: mweststrate

Differential Revision: D21550904

fbshipit-source-id: 044a11d38e211c6f57cce220adc8c42241a2043a
2020-05-15 04:43:56 -07:00
Pascal Hartig
c54028981f Fix tmp usage in crash reporter setup
Summary:
This happened during startup:
{F237135281}

From `tmp` docs:

> IMPORTANT NOTE: template no longer accepts a path. Use the dir option instead if you require tmp to create your temporary filesystem object in a different place than the default tmp.tmpdir.

Reviewed By: mweststrate

Differential Revision: D21570416

fbshipit-source-id: 170886d0fda5e21cb23fe836fcde33eb457a4c1b
2020-05-15 04:40:57 -07:00
dependabot-preview[bot]
50666e9296 Bump promisify-child-process from 3.1.4 to 4.1.0 in /desktop (#1155)
Summary:
Quite keen on this as it removes a babel runtime dependency.

Pull Request resolved: https://github.com/facebook/flipper/pull/1155

Reviewed By: nikoant

Differential Revision: D21522869

Pulled By: passy

fbshipit-source-id: 66e272e1b6a6eb78a51038f20a1717ba0196ec2c
2020-05-13 10:22:02 -07:00
Pascal Hartig
d7035b7e7d Whitelist cjs extension for metro
Summary: This is required for the new release of promisify-child-process.

Reviewed By: mweststrate

Differential Revision: D21543812

fbshipit-source-id: dc254ea51381696b9927f7c62dd36e10ef00fcac
2020-05-13 10:22:02 -07:00
Pascal Hartig
5fe3e9a44a Add test for LowPassFilter
Summary: Eating my own dogfood.

Reviewed By: mweststrate

Differential Revision: D21545655

fbshipit-source-id: 1e2690478ad8a986915a98a8275a168fa4c3a23f
2020-05-13 07:48:37 -07:00
Pritesh Nandgaonkar
dcaff4babc @allow-large-files Upgrade typescript
Summary: This diff updates the typescript version and it fixes `yarn lint:tsc`. It also successfully pointed out fes of the problems in our codebase. I have fixed those problems

Reviewed By: mweststrate

Differential Revision: D21548003

fbshipit-source-id: e69c986ee3c763588d9e1e290dad08d1cf1976a8
2020-05-13 06:57:28 -07:00
generatedunixname89002005306973
9bead5e05c Flipper Release: v0.42.0
Summary: Releasing version 0.42.0

Reviewed By: passy

Differential Revision: D21520625

fbshipit-source-id: 9f3ce5739a0856de84b18df3c640e5218fd3182e
2020-05-13 02:16:13 -07:00
dependabot-preview[bot]
258b0314f5 Bump tmp from 0.2.0 to 0.2.1 in /desktop (#1127)
Summary:
Bumps [tmp](https://github.com/raszi/node-tmp) from 0.2.0 to 0.2.1.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/raszi/node-tmp/blob/master/CHANGELOG.md">tmp's changelog</a>.</em></p>
<blockquote>
<h2>v0.2.1 (2020-04-28)</h2>
<h4>🚀 Enhancement</h4>
<ul>
<li><a href="https://github-redirect.dependabot.com/raszi/node-tmp/pull/252">https://github.com/facebook/flipper/issues/252</a> Closes <a href="https://github-redirect.dependabot.com/raszi/node-tmp/issues/250">https://github.com/facebook/flipper/issues/250</a>: introduce tmpdir option for overriding the system tmp dir (<a href="https://github.com/silkentrance">silkentrance</a>)</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><a href="https://github-redirect.dependabot.com/raszi/node-tmp/pull/253">https://github.com/facebook/flipper/issues/253</a> Closes <a href="https://github-redirect.dependabot.com/raszi/node-tmp/issues/191">https://github.com/facebook/flipper/issues/191</a>: generate changelog from pull requests using lerna-changelog (<a href="https://github.com/silkentrance">silkentrance</a>)</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Carsten Klein (<a href="https://github.com/silkentrance">silkentrance</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/raszi/node-tmp/commits">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=tmp&package-manager=npm_and_yarn&previous-version=0.2.0&new-version=0.2.1)](https://dependabot.com/compatibility-score/?dependency-name=tmp&package-manager=npm_and_yarn&previous-version=0.2.0&new-version=0.2.1)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1127

Reviewed By: nikoant

Differential Revision: D21475580

Pulled By: passy

fbshipit-source-id: 5ddd73368b4178cd7a4b431e1661f9509f080635
2020-05-12 05:17:02 -07:00
Chaiwat Ekkaewnumchai
ee2369950f Sort Result From ID instead of Using Directly from Result
Summary:
As mentioned in [the first comment in the Github issue](https://github.com/facebook/flipper/issues/989#issuecomment-616673590), we were mixing database `id` given from client and `index + 1` on server side. After investigating, most are used correctly; it searches `id` from given database `name`. However, there are a few (if not one) that, in my opinion, was used incorrectly. For example, [`tableOption`](https://fburl.com/diffusion/vlo7xbo1) assumed `id - 1` is the index, which is sometime incorrect.

This diff sorts the database listed from client by `id` before storing in the state.

Changelog: Fixed wrong order assumption on server side

Reviewed By: jknoxville

Differential Revision: D21496345

fbshipit-source-id: 5e15f776356b0357ac14fbde6c2a11efd76cd1e1
2020-05-12 04:54:31 -07:00
dependabot-preview[bot]
598fee9546 Bump @jest-runner/electron from 2.0.2 to 3.0.0 in /desktop (#1125)
Summary:
Bumps [jest-runner/electron](https://github.com/facebook-atom/jest-electron-runner) from 2.0.2 to 3.0.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="c31ddef68c"><code>c31ddef</code></a> v3.0.0</li>
<li><a href="059b6d8746"><code>059b6d8</code></a> jest@^25.0.0 (<a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/62">https://github.com/facebook/flipper/issues/62</a>)</li>
<li><a href="5f8c247051"><code>5f8c247</code></a> Work around enable debugging and logging <a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/59">https://github.com/facebook/flipper/issues/59</a> (<a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/60">https://github.com/facebook/flipper/issues/60</a>)</li>
<li><a href="13de05944c"><code>13de059</code></a> rpc: Bump yargs to 15.3.1 (<a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/58">https://github.com/facebook/flipper/issues/58</a>)</li>
<li><a href="b6c849ee05"><code>b6c849e</code></a> v2.0.3</li>
<li><a href="8b7c595e30"><code>8b7c595</code></a> Updates commandLine switches to occur before app start (<a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/49">https://github.com/facebook/flipper/issues/49</a>)</li>
<li><a href="d9546e4dd6"><code>d9546e4</code></a> Add async test (<a href="https://github-redirect.dependabot.com/facebook-atom/jest-electron-runner/issues/46">https://github.com/facebook/flipper/issues/46</a>)</li>
<li>See full diff in <a href="https://github.com/facebook-atom/jest-electron-runner/compare/v2.0.2...v3.0.0">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=@jest-runner/electron&package-manager=npm_and_yarn&previous-version=2.0.2&new-version=3.0.0)](https://dependabot.com/compatibility-score/?dependency-name=@jest-runner/electron&package-manager=npm_and_yarn&previous-version=2.0.2&new-version=3.0.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1125

Reviewed By: nikoant

Differential Revision: D21499761

Pulled By: passy

fbshipit-source-id: 92d9785579f7d581484ebdb9aaa4c5fe91d49939
2020-05-12 03:22:57 -07:00
Timur Valiev
596e11a463 searchable data inspector
Summary: Naive implementation of searchable data inspector: matching of search term agains first level keys of data

Reviewed By: cgrushko

Differential Revision: D21510073

fbshipit-source-id: 2010e584248a64fb3351c95a5646b1935445a13b
2020-05-12 01:04:47 -07:00
Zheng Rongyan
2dcb73aba5 Check whether the request url is null or not to avoid error. (#1146)
Summary:
### The existing issue
[The `buildRow` function in `network/index.js`](c7ff6f6266/desktop/plugins/network/index.tsx (L458)) doesn't check if the url is valid. However,
since the `request` data comes from the App which developers are building,
there will be an error, if the `request.url` is `null` or `undefined`.

![image](https://user-images.githubusercontent.com/7471672/81561808-5c536b80-93c6-11ea-846b-3aa76d726350.png)

When this error occurs,  the `NetworkTable` can't go back to normal even I try to  click `Clear error and try again`.  Only after killing the Flipper desktop and restart again, it can work again.
![error](https://user-images.githubusercontent.com/7471672/81563438-d553c280-93c8-11ea-86be-883fa457dda3.gif)

### How to fix

In order to make `Flipper` desktop more stable, I think it is better to check the url is valid and avoid the crash.

## Changelog

-  check the url in the `buildRow` function in `network/index.js`
Pull Request resolved: https://github.com/facebook/flipper/pull/1146

Test Plan:
- [x] Using the same input `request` data, `Flipper` will not show this row and it works as normal.
![image](https://user-images.githubusercontent.com/7471672/81562713-e819c780-93c7-11ea-809d-cf6893c58a68.png)

Reviewed By: jknoxville

Differential Revision: D21502032

Pulled By: passy

fbshipit-source-id: 1dd8ad7f13297ce99680053447024a8563b8a975
2020-05-11 09:13:05 -07:00
Pascal Hartig
3ddfdcbff1 Remove unused supportRequestFormUtils
Summary: This was for V1 (D16990925) and is no longer referenced anywhere.

Reviewed By: nikoant

Differential Revision: D21501270

fbshipit-source-id: fef30f38c917afcd3d4150a0165cd0a59ad42b6a
2020-05-11 09:13:05 -07:00
borisdamato
d5cb0e907f Fix pencil icon visible for non-editable fields (#1002)
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)**
![image](https://user-images.githubusercontent.com/1525460/79031299-c1345f80-7b95-11ea-8807-247794554524.png)

**Non-Editable (Custom Plugin)**
![image](https://user-images.githubusercontent.com/1525460/79031336-f771df00-7b95-11ea-8608-936495153fc2.png)

Reviewed By: passy

Differential Revision: D21400359

Pulled By: mweststrate

fbshipit-source-id: 62b18f3f6c75c1b07440d51fca363d7e6fc60c6a
2020-05-11 09:13:04 -07:00
Scott Kyle
c7ff6f6266 Improve props for ToolbarIcon
Summary: This allows props like `style` to be passed through (so it can be further styled), and makes `active` optional.

Reviewed By: jknoxville

Differential Revision: D21438791

fbshipit-source-id: bbab4a7768fce5de56e4deff67e50ff69914d123
2020-05-07 11:14:00 -07:00
John Knox
9534cafb17 Fix type of params in client.send and client.call
Summary:
Fixes https://github.com/facebook/flipper/issues/1142

When using `client.call(methodName, params)`, params has to be an object, not, for example a string.

It may work on some client implementations, e.g. iOS, but this is a coincidence and not to be relied on. If this gives you new type errors, the plugin should continue to run in the short term but has no guarantees, please adapt it to conform. You can do this by preserving backwards compatibility by doing a typecheck in your client plugin if necessary.

CHANGELOG: Calling `client.call()` or `client.send()` now fails to type-check if params is not an object, to match client implementations.

Reviewed By: nikoant

Differential Revision: D21450694

fbshipit-source-id: 53db49f874838769e39a94b1c4bd4c0b30ecdbc7
2020-05-07 10:19:38 -07:00
Chaiwat Ekkaewnumchai
5ccc392135 Temporary Fix When Element Is Null
Summary:
a bug found while trying to use multiple selector on Wilde. The data returned from specific call is not in the form that we expect. This caused an exception on layout plugin when using the selector

Specifically in WIlde, when we try to get data from node by calling client side to return it, sometimes the node has been invalidated or not saved. Hence, data returned are null or undefined. However, in previous implementation, this didn't take into consideration because we assumed that we always got correct data from client.

Reviewed By: mweststrate

Differential Revision: D21410989

fbshipit-source-id: 5135578606678973b504c9be897cb48fca547555
2020-05-07 06:18:38 -07:00
Chaiwat Ekkaewnumchai
736d681562 Add Detail to Selected Row
Summary:
- Add detail sidebar to data tab. This reuses `renderSidebar` from SQL tab
- `renderTable` function is moved into the component to easier access `renderSidebar`

Reviewed By: mweststrate

Differential Revision: D21406942

fbshipit-source-id: 5c79489a80931b1133c0a28ca5897a27ba9dd6b8
2020-05-07 06:15:51 -07:00
Pascal Hartig
cfc569e07c @allow-large-files Update flow to 0.124
Summary:
Per title.

Close https://github.com/facebook/flipper/pull/1134

Reviewed By: jknoxville

Differential Revision: D21428040

fbshipit-source-id: 87411ca06d3b2aab9465806c432b8994d2068661
2020-05-07 05:42:09 -07:00
John Knox
fbb9f805d4 Disable crash reporter plugin on physical iOS devices
Summary: It doesn't currently work on them, so removing to avoid confusion.

Reviewed By: priteshrnandgaonkar

Differential Revision: D21448681

fbshipit-source-id: 6ef46f8551921c1c5bdba17fd65f762292f1dd0e
2020-05-07 05:31:06 -07:00
João Vieira
64deaee5a7 Normalize export to fle and share link behaviour.
Summary:
Both export methods behaved slightly differently:
* Export to file returned earlier when running in background, which skiped the tracking of export termination;
* Share link always showed notification, even when on foreground;
* Share link status "hanged" - the share was never unset.

This change makes both consistent:
* Always track export finish - whether its in foreground or background;
* Only show notificaiton if running in background;
* Always reset the share/status.

On top of this it also:
* Normalizes the screenshot status to terminate in '...' as all the others;
* Only copies export URL to clipboard when exporting link if running in the background.

Reviewed By: passy

Differential Revision: D21425095

fbshipit-source-id: 9864a63269df6bd05ab065ff0e5d9f17b9ac6db6
2020-05-07 04:05:27 -07:00
João Vieira
a2d7297bbb Rename Flipper trace to Flipper export.
Summary: Rename visual references from Flipper trace to Flipper export.

Reviewed By: passy

Differential Revision: D21408566

fbshipit-source-id: 1021fec095f2f2f3e5394e7ea2f7d49fee186050
2020-05-07 04:05:27 -07:00
John Knox
77ca337011 Fix Searchable token capitalization bug
Summary:
There's an issue with the Searchable component, where the keys in manually typed filters (key=value) are case sensitive, but you would never know that because even after creating a filter by clicking on a cell, the new one looks capitalized "Tag=..." where really it is "tag=...".

This changes the blue filter tokens to show what you would have to type to recreate it.

I haven't made the key case insensitive because there may be some capitalized uses of it out in the world and that would break them.
Also, it would be nice, as the capitalized key tends to be equal to the column name you see in the header, but that column name can actually be anything, so that could be a bit misleading.

Context: https://fb.workplace.com/groups/flippersupport/permalink/869112616902731/

Reviewed By: mweststrate

Differential Revision: D21448087

fbshipit-source-id: 8b28e3b890f024bbad03ffd0809e9e1e888075f0
2020-05-07 04:02:33 -07:00
Michel Weststrate
7ba94248ae Performance optimizations
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
2020-05-07 03:53:49 -07:00
Chaiwat Ekkaewnumchai
8a06f4bd72 Unit Test for Multiple Selector Data Handler
Summary: per title

Reviewed By: mweststrate

Differential Revision: D21304005

fbshipit-source-id: 97231d49a2c6fb3faeafa15587bc140bdc1dbea3
2020-05-07 03:41:01 -07:00
Chaiwat Ekkaewnumchai
6daff06e19 (server) Click to Expand in Multiple Selector
Summary:
per title

Changelog: Add multiple selector to layout inspector to allow user to select components at a position

Reviewed By: mweststrate

Differential Revision: D21214898

fbshipit-source-id: 7b52d9d3c93e7ec0d28124a3a675ccfdd014c54d
2020-05-07 03:41:00 -07:00
Chaiwat Ekkaewnumchai
a6b69f7939 (server) Make Multiple Selector Collapsable
Summary: per title

Reviewed By: mweststrate

Differential Revision: D21214900

fbshipit-source-id: 61e565391ca7d5796bb22c9ece76ea5dabe97be7
2020-05-07 03:41:00 -07:00
Chaiwat Ekkaewnumchai
83a2203751 (server) Multiple Selector on Layout Inspector
Summary:
This diff adds multiple selector UI on layout plugin, which shows up when there are more than one component at a touch.

This UI allows user to do similar thing to element inspector. Expanding functionality on main component will be added in next diffs.

Reviewed By: mweststrate

Differential Revision: D21214899

fbshipit-source-id: 5c9cae93122cc4f7c326ccd0878d2b9dddebf62b
2020-05-07 03:41:00 -07:00
Chaiwat Ekkaewnumchai
9962b1c687 Calculate Roots And Seeds If Root Is Not Given
Summary:
The component will show nothing if root element if not provided. In my case, I just want to reuse it without root specified due to elements are separated

## Explanation for seed and root
`flatElements` is the representation of component tree expressed in an array form. It is derived from an object `props.elements` where id (key) is corresponding to its information about a component (value). This includes children ids of a component. `flatElements` allows visual indentation to be easily done at render process; we can use level directly as the number of spaces we need to make.

`FlatElements` can be evaluated to tree by:
- the lowest number is the root of a tree (in this case, it is 1)
- a node with `i+1` level is a child of a closest previous node with level `i`

`seed` is the function trying to derive elements in object form to array form. First, it is given that there is one id to be a root node.

However, This component will not be rendered if a root node id is not given, while a root node id can be null or undefined, which doesn't make sense to me. In addition, if I want to reuse this component, this component should render without root node id given. That's the reason why there's this diff.

The implementation is as followed:
1. Set every node to be root (level 1)
2. Iterate through elements
 2.1. Remove nodes that are children of elements because they cannot be roots

Assumed that there is no cycle, in the end we get all root nodes. Then, we do `seed` for all root nodes to get all trees in `FlatElements` structure

Even though to cover my feature the removal of ids are not needed because we know that all elements will be roots of themselves, I want to cover the case that a user wants tree-like (or forest-like) hierarchy view without given root id.

(Disclaimer: this is written from what I have observed while investigating this. I am not a person who have initially designed this, so apologize in advance in this is not correct)

Reviewed By: mweststrate

Differential Revision: D21214897

fbshipit-source-id: 7657d0ea8607e07e97be968ef927f17c2bc8990e
2020-05-07 03:40:59 -07:00
Chaiwat Ekkaewnumchai
a7163bf06d (server) Add New Parameter And Functions for Select Subscriber
Summary:
- add type to represent the returned component tree
```
expected data:
{
  [nodeID1]: [subtree1],
  [nodeID2]: [subtree2],
  ...
}
example:
{
   id1: {
    id2: {
      id3: {
        id4: {},
        id5: {
          id6: {}
        }
      }
    }
  }
}
```
- add functions to deal with a tree
  - `_getElementLeaves` for finding ids that don't have any child given the tree structure
  - `_getPathForNode` for finding path (similar to previous path parameter) for given id
- This diff still retain functionality in case of selector appear to touch only one element.

Reviewed By: mweststrate

Differential Revision: D21040427

fbshipit-source-id: e6704535a437ad47d9664cc16896b9f24c9d6736
2020-05-07 03:40:57 -07:00