Summary:
I don't think this should make a difference in our size. Will see
in the size check.
This makes it quite hard right now to read errors that involve the data-source
package because terser runs over it.
Reviewed By: nikoant
Differential Revision: D29228941
fbshipit-source-id: 8cc79e4148be0e8ced9186323967bc79ba781c0b
Summary:
With new abstraction, `DataList` matches what the plugin trying to render.
Should fix:
https://fb.workplace.com/groups/flippersupport/permalink/1145431339270856/
Changelog: [MobileConfig] Fix issues with scrolling not working and several other improvements
Reviewed By: cekkaewnumchai
Differential Revision: D28314408
fbshipit-source-id: 4d8fbe3d8e868f737750203cd568d94bae8b4108
Summary:
Re-introduced context menu to DataTable, due to popular demand.
Originally it wasn't there to better align with ant design principles, but in an app like Flipper it makes just too much sense to have it
See e.g. https://fb.workplace.com/groups/flippersupport/permalink/1138285579985432/
changelog: Restored context menu in data tables
Reviewed By: passy
Differential Revision: D28996137
fbshipit-source-id: 16ef4c90997c9313efa62da7576fd453a7853761
Summary: Fixed minor keyboard navigation annoyance: pressing arrow down on the last entry would remove selection, then jump to first row. Pressing up on first row would deselect then select first again. After this change the first/last item is kept selected in those cases
Reviewed By: passy
Differential Revision: D28958705
fbshipit-source-id: 01dbce3971ed965eae3b74e6706fef96aa86df66
Summary: some type simplifications, that makes it easier to reuse data sources and helps type inference
Reviewed By: passy
Differential Revision: D28413380
fbshipit-source-id: 261a8b981bf18a00edc3075926bd668322e1c37d
Summary:
Improving usability of the WAIQWatch plugin.
Also fixing a bug in `MasterDetail`, which didn't use `sidebarSize` as `height` when detail panel is shown at the bottom.
iOS companion diff here: D28756787
Reviewed By: tomw
Differential Revision: D28751609
fbshipit-source-id: ba27ae7ce3596179752c963dba1bf4b994767c2a
Summary: Changelog: Increased contrast of timestamps text on marker timelines used in several plugins (QPL, Sections)
Reviewed By: mweststrate
Differential Revision: D28707431
fbshipit-source-id: 8749a95fccf895bddf707c1d830baf5c65578fb9
Summary:
Added demo to show how DataSource can power charts using event sampling and smart windowing.
A more experimental application: use dataSource to power some charts, that leverages the events emitted from an datasource that is continuously being appended:
- incoming events are downsampled 1 in 100 to build up the bottom window
- incoming events are not downsampled to render the topwindow, but since datasource views will ignore events outside the window, things will stay pretty responsive when a window is selected (without a window, the downsampled dataset is used as source for top chart as well).
Compared to a naive (well still slightly optimised with useFastArray) implementation that throws all incoming event in a big array, it performs > 20 times faster (see difference in amount of events processed)
Reviewed By: passy
Differential Revision: D28474409
fbshipit-source-id: 6a7973d1ade3053b1d6c8f72069697d96b1ef4fd
Summary: When reporting errors we could add info about interactions which caused errors. Ability to connect errors and interactions could be quite helpful for analysing and debugging errors and where they are coming from.
Reviewed By: passy, mweststrate
Differential Revision: D28467575
fbshipit-source-id: bef69917a4d6c786d762a2f6eb75a47fd4e46b0f
Summary: Tracked component catches rejected promises under it to log them. After catching promises become "handled". This might hide potential promise error handling mistakes, so it's better to ensure we keep promises unhandled after catching them for tracking, so they are properly catched by the unhandled promise handler after that. The easiest solution seems to just make new rejected promise and return it instead of the catched one.
Reviewed By: passy
Differential Revision: D28466570
fbshipit-source-id: 26c1e7af3d6e4f7067b95f20e646462d808bb497
Summary:
Fix performance issue in rendering sidebars
Noticed during debugging that sidebars are continuously re-rendering if the mouse is on top of them, which is caused by the mouseMove handler of resizable containers always updating the state with a fresh object, causing a render (see yellow rectangles in test plan). Short circuited this by checking if the resize state should actually change and bailing out otherwise.
Reviewed By: nikoant
Differential Revision: D28441431
fbshipit-source-id: b3f125f3a392a5cf9b021a6636ba39b5a23d541c
Summary:
Changelog: [Logs] Fix regression causing the scrollbars to be hidden. This diff fixes a regression where the Logs plugin was no longer scrollable (and scrolls indefinitely, killing perf).
As reported in https://fb.workplace.com/groups/flippersupport/permalink/1133775743769749/
The cause of the problem is the swap between the `PluginContainer` and `outOfContentsContainer`.
The deeper root that caused in the first place, is that containers use a `flex: 1` layout, which gets interpreted as `flex: 1 1 0%` (grow, shrink, 0% by default), where it was always inteded to be `flex: 1 1 0` (grow, shrink, by default zero pixels). In practice that difference usually doesn't matter. But sometimes it does... See https://stackoverflow.com/a/42630660/1983583
My whole life has been a lie up to this point.
Will trigger a new release after landing this.
Reviewed By: nikoant
Differential Revision: D28422966
fbshipit-source-id: 3ebd5f8ae76e032c5d698154b021df8ebef2c757
Summary:
Added a microbundle based build setup to the data-source folder to be able to package just that folder.
For simplicity / iteration speed, this is only used to publish externally. Our own code still references the source files directly.
More strict separation can be done later if there is external adoption.
Reviewed By: nikoant
Differential Revision: D28056699
fbshipit-source-id: a011b615cfffeff8ecb879bd7281a71085cea965
Summary:
To make the DataSource abstraction reusable for other teams and an upcoming talk, this diff moves all DataSource storage & virtualization logic in one folder.
Will set up a build process and demo project in later diffs.
Reviewed By: nikoant
Differential Revision: D28056700
fbshipit-source-id: 7cfe5b40bbbe387da711f765a604a45029d451c7
Summary:
The `flipper` dependency is being deprecated for plugins, so upgraded the plugin to new APIs. This should be pretty safe, however, I'm not sure how to test it :)
Also removed react-diff-viewer dependency, as that seemed unused.
Reviewed By: passy
Differential Revision: D28091469
fbshipit-source-id: b9be007e3fc7b0689b1e1f711849ed82a6e01716
Summary: Found a small issue in the column width calculation where initial invisible columns still got space assigned.
Reviewed By: passy
Differential Revision: D28221659
fbshipit-source-id: ef052533bc37bc833bab72979803ce36bcf50e61
Summary:
converted the network plugin to use DataSource / DataTable. Restructured the storage to contain a single flat normalised object that will be much more efficient for rendering / filtering (as columns currently don't support nested keys yet, and lazy columns are a lot less flexible)
lint errors and further `flipper` package usages will be cleaned up in the next diff to make sure this diff doesn't become too large.
The rest of the plugin is converted in the next diff
Reviewed By: nikoant
Differential Revision: D27938581
fbshipit-source-id: 2e0e2ba75ef13d88304c6566d4519b121daa215b
Summary:
With proper notification, components and code clean up in place, time for the reward and giving the plugin a fresh look.
Changelog: CrashReporter plugin got a fresh look and several navigation issues were addressed.
Reviewed By: passy
Differential Revision: D28102398
fbshipit-source-id: 5721634e45c5b1fc5fba3fb0c0b8970635b80b46
Summary: Added wash color option to Toolbar, made codeblocks transparent rather than gray & bordered, which looks cleaner
Reviewed By: passy
Differential Revision: D28119720
fbshipit-source-id: 9d1f4db5b39a91d9d117046bd5482726ac2f555d
Summary:
Changelog: Standardized DataList component
This diff standardizes the DataList component, by reusing the DataList. This is done to be able to take full advantage of all its features like virtualisation, keyboard support, datasource support, etc.
Also cleaned up DataTable properties a bit, by prefixing all flags with `enableXXX` and setting clear defaults
Reviewed By: passy
Differential Revision: D28119721
fbshipit-source-id: b7b241ea18d788bfa035389cc8c6ae7ea95ecadb
Summary:
Code blocks are quite common in Flipper, and a bit verbose in Ant, so let's standardize!
Changelog: Standardize CodeBlock component
Reviewed By: passy
Differential Revision: D28117560
fbshipit-source-id: 5a5538a49b59ef40c814d22055fac56e7598cbbb
Summary: Flipper Sandy plugins didn't have an event to hook into that is run _after_ any state snapshot is loaded, which was needed by the graphQL plugin, as they do some post processing when a data snapshot is restored.
Reviewed By: passy
Differential Revision: D28189573
fbshipit-source-id: 4ef992f3fafc32787eab3bc235059f2c41396c80
Summary:
Bumps [jest-mock-console](https://github.com/bpedersen/jest-mock-console) from 1.0.1 to 1.1.0.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/bpedersen/jest-mock-console/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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)
---
<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)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/2265
Reviewed By: mweststrate
Differential Revision: D28181903
Pulled By: passy
fbshipit-source-id: 40b305d3a90a01adfb7e21b3cbd5a8e75ce5de04
Summary:
Increase the mouse target for copying values from the the tree in a data inspector to the full row, not just the text.
Not sure if bringing reversing the order here has any unintended side-effects, but in testing it seems to work fine.
Reviewed By: mweststrate
Differential Revision: D28185064
fbshipit-source-id: b9b86a7e181bfd0083f2a3bcb24c571b5ec4647e
Summary:
This help handle updates to objects containing JSONObject type (generates typescript errors around infinite recursion:
> Type instantiation is excessively deep and possibly infinite.ts(2589)
Reviewed By: mweststrate
Differential Revision: D28098502
fbshipit-source-id: a8e7f785b03bce7c8e1c0b355e2eca2e087b1881
Summary:
Noticed a regression in sticky scrolling not being sticky. I suspect this is caused by pixel inaccuracy + rounding, but our offset from bottom calculation consistently now reports `1` when being at the end of the scrollable region.
Too bad it is really hard to protect against these kind of regressions automated.
Reviewed By: passy
Differential Revision: D28095803
fbshipit-source-id: 1dbd57d84fb308023c2300c543aca344bf27ec28
Summary:
Trying to get ahead of dependabot by bumping a bunch of things at once
that are minor or patch level bumps.
Reviewed By: muraziz
Differential Revision: D28094201
fbshipit-source-id: b6b53ae2d582686201124b82fed4f436a60b3172
Summary: This fixes an earlier reported issue with Messages plugin, if no column widths are set values can jump around per row
Reviewed By: passy
Differential Revision: D28090807
fbshipit-source-id: be124b94f507584cf177710816035cd280a5ef01
Summary:
Noticed in reviews during the convertathon there is still quite some boilerplate in things that happen on the boundary of UI and plugin state, such as setting up menu entries and providing common functionality like clear, master/detail layout, etc.
This diff introduces the `MasterDetail` component, which takes a higher level approach by merely needing to provide the state atoms and desired features, and taking care of the wiring.
Applied it to createTablePlugin, to prove that going from `createTablePlugin` to `MasterDetail` will be a much smaller step now.
Verified on the funnel logger plugin
Reviewed By: passy
Differential Revision: D28090362
fbshipit-source-id: 146f8c315fea903901ad4e3e46711642f16cf0e6
Summary: This diff exposes the createTablePlugin from flipper-plugin, so that createTablePlugin based plugins can be converted to Sandy as well
Reviewed By: jknoxville
Differential Revision: D28031227
fbshipit-source-id: 8e9c82da08a83fddab740b46be9917b6a1023117
Summary: Having time / async / non-blocking behavior in components in unit tests is really annoying, as it makes unit tests async without an easy way to determine 'done'. This diff makes sure that DataTable & DataInspector don't break down their work in smaller tasks, but do everything block if they are running in a unit test.
Reviewed By: nikoant
Differential Revision: D28054487
fbshipit-source-id: 72c3b519e092ad69ed71eb1731e1fed80022f91f
Summary:
Two minor renames:
* `DataInspector` => `DataInspectorNode`
* `ManagedDataInspector` => `DataInspector`
This aligns the internal and public name of the component, and better captures the meaning of the original `DataInspector` class.
The diff looks quite hefty, but that seems to be a phabricator issue caused by the filename swap; barely a thing changed :)
Reviewed By: jknoxville
Differential Revision: D28028554
fbshipit-source-id: d3d61fcb50abffaeae4bd1d26966604cece37b03
Summary: Moved Toolbar to flipper-plugin. No further changes.
Reviewed By: nikoant
Differential Revision: D28027334
fbshipit-source-id: 35de13d87734ae3a8af037166945b1a669106274
Summary:
Introduced the `scrollable={false}` option to DataTable, that gives the table its natural size, while still having all the other gimmicks of DataTable, like search, filter, etc etc.
To implement this, a non-virtualizing rendering is needed, which is handled by the `StaticDataSourceRenderer`
Also introduced the option to hide the searchbar.
Reviewed By: nikoant
Differential Revision: D28036469
fbshipit-source-id: 633c4f7f3fabfa99efa2839059aaa59b0a407ada
Summary: This diff allows using a DataTable without setting up a full datasource, which is simpler in case the dataset is small and/or fixed. For an continuously growing dataset a DataSource should still be set up.
Reviewed By: jknoxville
Differential Revision: D28037897
fbshipit-source-id: 2e56b1970e19f967c3752a78737b8f7a3f934b87