Commit Graph

451 Commits

Author SHA1 Message Date
Luke De Feo
3ff0c301c8 Use exact mode when user explicitly filters on a column
Summary: Using substring doesnt make sense for these actions. As you say I want to filer on this cell but it includes many others

Reviewed By: aigoncharov

Differential Revision: D48515476

fbshipit-source-id: b7a77c022052bb33e2ce2a3f656dabab114d8a78
2023-08-21 05:59:44 -07:00
Luke De Feo
f5bc03c263 Add framework event node level event filtering
Summary: Lets you filter a nodes events by thread or type

Reviewed By: lblasa

Differential Revision: D48346955

fbshipit-source-id: 455d65ad21c54c5ad26782ac6a446f7ae15a4356
2023-08-21 04:24:16 -07:00
Luke De Feo
2d217575bb improve marker timeline
Summary:
1. removed background hover
2. made can select actually work
3. disable user selection
4. remove decimal points from ms

Reviewed By: lblasa

Differential Revision: D48270181

fbshipit-source-id: 724efedb5cad7f93c80ed5dd7f49efe4c434c324
2023-08-21 04:24:16 -07:00
Lorenzo Blasa
ff6f98fc0d Import File implementation
Summary: Implementation was missing for the browser. This provides a default implementation.

Reviewed By: aigoncharov

Differential Revision: D48311198

fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
2023-08-14 11:33:06 -07:00
Andrey Goncharov
2834d3300a Track filtering and searching for data table
Reviewed By: mweststrate

Differential Revision: D48116067

fbshipit-source-id: 2dee2cfd68a23e1153b3f10ff229009777e936da
2023-08-09 08:01:44 -07:00
Hamdullah Shah
0fdd901297 DataDescriptor BigInt
Summary: The `DataDescriptionType` accepts the `BigInt` type but it doesn't render. Added the `case` for that and reuse the `NumberValue` tag for it.

Reviewed By: aigoncharov

Differential Revision: D48152012

fbshipit-source-id: 32ebc8a37df34d57b40c7ecdad331c547415b335
2023-08-08 09:50:08 -07:00
Luke De Feo
3282417663 Fix bug where if events come in the creation of a new tab throws exception
Summary:
See title. The issue occurs because this tabs component derives a key by essentially serializing the children. Since its possible for different elements in the UIDebugger to have different number of tabs, due to framework events not always being present this was never anticipated.

Solution is to just let the callee supply a storage key which does not depend on the exact number of tabs

Reviewed By: lblasa

Differential Revision: D47520033

fbshipit-source-id: 67e57db5110fde52451d30496c25a25b0eb4a6f7
2023-07-19 08:58:20 -07:00
Lorenzo Blasa
532f6ff1ee App Inspect rounded container
Summary: ^

Reviewed By: antonk52

Differential Revision: D47591057

fbshipit-source-id: 5f3f308fb252245ebe510dd98b4cbd7ea7c6e27e
2023-07-19 06:12:07 -07:00
Andrey Goncharov
b55d730dd7 Integrate filter exceptions with DataTable
Summary: See previous diff for context

Reviewed By: LukeDefeo

Differential Revision: D47472005

fbshipit-source-id: 6e7d8873d275f826c38fab16c72e1621fd2784e1
2023-07-18 05:25:59 -07:00
Anton Kastritskiy
bdd502d54f navbar placeholder
Reviewed By: elboman

Differential Revision: D47398098

fbshipit-source-id: 6e9518b47292b351153015da233574f7abfd0396
2023-07-18 03:52:34 -07:00
Michel Weststrate
c8776175c3 Added support for secondary indices for fast lookups
Summary:
Add support for secondary indices, to allow for cheap lookups, like a set of events for a specific UI element in the events table:

```

#### getAllRecordsByIndex

Usage: `getAllRecordsByIndex({ indexedAttribute: value, indexAttribute2: value2, .... })`

This method allows fast lookups for objects that match specific attributes exactly.
Returns all items matching the specified index query.
Note that the results are unordered, unless
records have not been updated using upsert / update, in that case
insertion order is maintained.
If no index has been specified for this exact keyset in the indexQuery (see options.indices), this method will throw.

Example:
```

```
const ds = createDataSource([eatCookie, drinkCoffee, submitBug], {
  key: 'id',
  indices: [
    ['title']
    ['id', 'title'],
    ['title', 'done'],
  ],
});

// Find first element with title === cookie (or undefined)
const todo = ds.getFirstRecordByIndex({
    title: 'cookie',
})

// Find all elements where title === cookie, and done === false
const todos = ds.getAllRecordsByIndex({
  title: 'cookie',
  done: false,
})
```

Reviewed By: antonk52

Differential Revision: D47396435

fbshipit-source-id: 20c4527be83532863b9b07ab20ebf20a80c3c35d
2023-07-14 07:46:52 -07:00
Andrey Goncharov
1c532095ab Expose suggestNewPlugin as a shared util
Reviewed By: antonk52, ivanmisuno

Differential Revision: D46798839

fbshipit-source-id: f2b942a138a998f167b60c04c32c634545bbfe96
2023-06-16 08:29:54 -07:00
Andrey Goncharov
16b4d58ac3 Support filtering by exact match
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Reviewed By: antonk52

Differential Revision: D46642517

fbshipit-source-id: e23eead18189adb9aaacb7eab3244cfce289203e
2023-06-12 07:29:55 -07:00
Andrey Goncharov
b9322247e6 Make assert stable ref error more explicit
Reviewed By: ivanmisuno

Differential Revision: D46359534

fbshipit-source-id: 002e4e8ae9168cf2cf3b652fc853416de825861f
2023-06-06 03:44:48 -07:00
Anton Kastritskiy
12734d6b7e allow column filter to be loose
Summary:
Until now when we filter by a column value we only get the items that match this value exactly.

Release: we can add loose filters that match value or `undefined`

Reviewed By: lblasa, ivanmisuno

Differential Revision: D46318631

fbshipit-source-id: 94ecb3f074674d4b0ce3a480f4f3b9ddc058ceef
2023-06-01 06:51:41 -07:00
Lorenzo Blasa
6430403da0 Jest update v26.6.3 -> v29.5.1
Summary:
^

Basically, update Jest and fix any raised issues. Mainly:
- Update necessary dependencies
- Update snapshots
- `useFakeTimers` caused a few issues which meant that the way we hook into the performance object had to be tweaked. The main code change is: `//fbsource/xplat/sonar/desktop/scripts/jest-setup-after.tsx`
- `mocked` -> `jest.mocked`

Changelog: Update Jest to v29.5.1

Reviewed By: antonk52

Differential Revision: D46319818

fbshipit-source-id: d218ca8f7e43abac6b00844953ddeb7f4e1010a2
2023-05-31 14:19:29 -07:00
Anton Kastritskiy
fda21e96e8 Update typescript to 4.9.5
Reviewed By: passy

Differential Revision: D46068908

fbshipit-source-id: 4c1ffff8690eec5a10c67d6c5d1aacf224e0f0d4
2023-05-23 03:15:10 -07:00
Andrey Goncharov
33ae7f23db Fix column sorting not visible
Summary: Fixes a regression from D45394048. It "sortable" as a nullable column prop. When it is undefined it should be treated as true.

Reviewed By: LukeDefeo

Differential Revision: D45776216

fbshipit-source-id: dcd8ce97217086deab7b2b1852837fbfa7437d13
2023-05-11 08:14:05 -07:00
Andrey Goncharov
78b650dbe0 Make fliters non-exclusive
Summary:
Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Also, sync quick filters with the internal filter state of the table

Reviewed By: antonk52

Differential Revision: D45396180

fbshipit-source-id: 6a8ef4ac61a49ec7af71ae9e26f20f395fb34cef
2023-04-28 12:19:45 -07:00
Andrey Goncharov
65daaf80f1 Expose table state from table manager
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Reviewed By: antonk52

Differential Revision: D45395107

fbshipit-source-id: 8ca3639a109e40b26acead8bb4b0eace68ac9bce
2023-04-28 12:19:45 -07:00
Andrey Goncharov
424985a75a Expose removing filters programatically
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit

Reviewed By: antonk52

Differential Revision: D45394864

fbshipit-source-id: d2c140d542eaee157cbad5b6a0f29fc62f73a18b
2023-04-28 12:19:45 -07:00
Andrey Goncharov
647bc06f3a Make filtered state of columns more apparent
Summary: People complained about barely noticeable filtered state indication multiple times

Reviewed By: antonk52

Differential Revision: D45394233

fbshipit-source-id: 60a3531b1808ae8f95ce8cd405a20b74bad0ed46
2023-04-28 12:19:45 -07:00
Andrey Goncharov
9d2de05723 Allow to disable column sorting
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Reviewed By: antonk52

Differential Revision: D45394048

fbshipit-source-id: 4255777d477f8240f52b5f82c28e922ef1011989
2023-04-28 12:19:45 -07:00
Andrey Goncharov
a819c77f18 Expose addColumnFilter from DataTable
Summary:
Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Used to set filters externally in next diff

Reviewed By: antonk52

Differential Revision: D45393487

fbshipit-source-id: 15c1186292f45de455ebbcbfced7a63c824a6c19
2023-04-28 12:19:45 -07:00
Andrey Goncharov
27eb5978a9 Pass TableManager instance to Details sidebar of any MasterDetail table
Summary: Project: https://docs.google.com/document/d/1SbFrpvfIShX5npANNa1AkgHliR1M-VMLW5Q9RhREt94/edit#

Reviewed By: passy

Differential Revision: D45354900

fbshipit-source-id: 7f968c9d235f5d8bb23e59e50e39fc1e9f498f46
2023-04-28 12:19:45 -07:00
Pascal Hartig
22e28a4f3e Bump prettier from 2.6.2 to 2.8.7 in /desktop
Summary: Updates prettier and applies the fixes.

Reviewed By: antonk52

Differential Revision: D45087515

fbshipit-source-id: 226814ab4805eb12e64c2134407164498c708c0a
2023-04-19 03:04:19 -07:00
Andrey Goncharov
ff85744911 Make DataView report window changes
Summary: Project: https://docs.google.com/document/d/1x-1ShlxXCM2od9JMO6PP14Cuqq0OrVe1Qd7FUwTos9A/edit

Reviewed By: antonk52

Differential Revision: D44748055

fbshipit-source-id: 409c272b12fb29c156efdaa1ab26d4d6a2936645
2023-04-06 10:10:34 -07:00
Andrey Goncharov
4e898eb01a Allow passing external virtualizedRef to DataTable
Summary: External virtualRef allows us to scroll the table programmatically whenever we want

Reviewed By: antonk52

Differential Revision: D44746968

fbshipit-source-id: ad8e0fb3b43881ed8f4ba114cd35c08643ef0d3b
2023-04-06 10:10:34 -07:00
Andrey Goncharov
794c29f320 Add "overlay" sidebar position to MaterDetail
Summary: Project: https://docs.google.com/document/d/1x-1ShlxXCM2od9JMO6PP14Cuqq0OrVe1Qd7FUwTos9A/edit

Reviewed By: ivanmisuno

Differential Revision: D44706158

fbshipit-source-id: 16c70a7c9a414a6c32d690eb05ae5b08818dd400
2023-04-05 07:22:15 -07:00
Andrey Goncharov
f8a1f38c0a Set flipperLib implementation automatically in unit tests
Summary: This way plugins get something meaningful when they call `getFlipperLib()` in their tests

Reviewed By: LukeDefeo

Differential Revision: D44662821

fbshipit-source-id: c13800f9d8e905ae4a89955f2186adb816730b77
2023-04-04 05:26:31 -07:00
Lorenzo Blasa
b0a8dbca01 MarkerTimeline to show a more obvious selected state
Summary:
When a marker is selected, it was difficult to notice any style differences.

This changes makes it more obvious when a marker is selected.

Reviewed By: antonk52, aigoncharov

Differential Revision: D44628828

fbshipit-source-id: c4634338e04969f3d973137ad861cb999b28c139
2023-04-04 04:05:15 -07:00
Lorenzo Blasa
f210ec809f Propagate onClick for TimelineDataDescription
Summary:
`onClick` was not getting called if it wasn't paired with `canSetCurrent`.

Ultimately, we can benefit from propagating this event in all cases as to give indication of whenever a marker has been selected.

Reviewed By: antonk52, aigoncharov

Differential Revision: D44628819

fbshipit-source-id: bee910b48ad065d7479e247fbacdcd738f281b26
2023-04-03 10:35:15 -07:00
Lorenzo Blasa
695c669e0c TimelineDataDescription to accept any properties
Summary: DataInspector can use `any` value to inspect. Lift the constraint from TimelineDataDescription as ultimately is not necessary i.e. the right inspector will be used based on the type of properties.

Reviewed By: antonk52

Differential Revision: D44572963

fbshipit-source-id: ad8a257020c90e18468e905f2beda44c2ee06368
2023-03-31 04:15:29 -07:00
Andrey Goncharov
09f7bcf878 Fail fast if DataSourceRendererVirtual references an non-existent value
Reviewed By: ivanmisuno

Differential Revision: D44417205

fbshipit-source-id: 043b3b12ea44d85f1fb02e2cf030b4c9cc7e5087
2023-03-27 06:50:59 -07:00
Andrey Goncharov
a0c17b94c4 Add track controls
Summary: Project: https://docs.google.com/document/d/1x-1ShlxXCM2od9JMO6PP14Cuqq0OrVe1Qd7FUwTos9A/edit#heading=h.fiq3qxllvkl

Reviewed By: ivanmisuno

Differential Revision: D44306047

fbshipit-source-id: 393741f9255dea3d582ac43a4733aa835f5d4a27
2023-03-23 04:12:31 -07:00
Lorenzo Blasa
d669fd08e5 TimelineDataDescription optional properties
Summary: Make properties optional. Additionally, only show them if found.

Reviewed By: mweststrate

Differential Revision: D43948493

fbshipit-source-id: 0aa77a725663b456f069c717b4ea051008516c9e
2023-03-10 06:18:21 -08:00
Lorenzo Blasa
b4f6f9f008 TimelineDataDescription optional onClick
Summary: Make this property optional as is not always required to implement it, if not needed.

Reviewed By: mweststrate

Differential Revision: D43948425

fbshipit-source-id: 43ed761c70c4779134f277a4cda53c1e3d326cb8
2023-03-10 06:18:21 -08:00
Lorenzo Blasa
bdf3dbe332 Export TimelineDataDescription
Summary: It wasn't exported, instead it was consumed by the 'flipper' deprecated module.

Reviewed By: fabiomassimo

Differential Revision: D43872434

fbshipit-source-id: 70a4a525c660f0779f942739311205417cef3834
2023-03-07 11:23:20 -08:00
Lorenzo Blasa
c839949fa4 MarkerTimeline add top margin as to center the 'point'
Summary: Without the margin, the point is displayed at the top-left which is not centrally aligned with both time and label.

Reviewed By: antonk52

Differential Revision: D43872394

fbshipit-source-id: 087c09e44c65ddaef79cfb25a860d7b4893ba072
2023-03-07 11:23:20 -08:00
Lorenzo Blasa
807544db4c MarkerTimeline remove top margin of Time
Summary: The margin was miss-aligning with the label.

Reviewed By: antonk52

Differential Revision: D43872373

fbshipit-source-id: 8a6ff8104c6e532d8139053aad221244c2cd5feb
2023-03-07 11:23:20 -08:00
Lorenzo Blasa
a7e523a77c MarkerTimeline set fixed decimals
Summary:
Set a fixed number of decimals for the 'ms'.
More doesn't give more insights and it messes with the overall layout.

Reviewed By: antonk52

Differential Revision: D43872203

fbshipit-source-id: 343278923ee27dbf884af41c997457bfba337ba8
2023-03-07 11:23:20 -08:00
Lorenzo Blasa
305de28f4e MarkerTimeline remove hover padding
Summary: Remove the bottom padding as this was not really making it any better.

Reviewed By: antonk52

Differential Revision: D43872178

fbshipit-source-id: 8302385d190c65000afda02b5c8aa9d272ccc271
2023-03-07 11:23:20 -08:00
Lorenzo Blasa
94587831d5 MarkerTimeline hover background color
Summary:
The hover background colour had complete disregard on the selected theme, both light and dark.

This change removes the gradient and instead sets a right hover background.

Reviewed By: antonk52

Differential Revision: D43872161

fbshipit-source-id: 4f0bfd97a2cb6bb9ceb7869dd38b37dc68ad6bb7
2023-03-07 11:23:20 -08:00
Fabio Carballo
fa74ebba68 Restore TimeMachine in Flipper
Summary:
The goal is to restore the *TimeMachine* functionality in Flipper while the new UI Debugger is working in a revamped version. This version was previously removed in D42573698 (b31f8c8755).

This time machine functionality will only be available for *LithoView* that are backed by a *ComponentTree*.

Below you can find a high-level overview of the current schema:

{F884011465}

Reviewed By: LukeDefeo, adityasharat

Differential Revision: D43574130

fbshipit-source-id: fe9d661e5fcce9655e70be4785652e7048dade54
2023-02-27 12:19:37 -08:00
dependabot[bot]
df5ddf01a6 Bump js-base64 from 3.7.4 to 3.7.5 in /desktop (#4519)
Summary:
Bumps [js-base64](https://github.com/dankogai/js-base64) from 3.7.4 to 3.7.5.
<details>
<summary>Commits</summary>
<ul>
<li><a href="7e790b799e"><code>7e790b7</code></a> version 3.7.5</li>
<li><a href="f729053682"><code>f729053</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dankogai/js-base64/issues/167">https://github.com/facebook/flipper/issues/167</a> from ctomacheski/main</li>
<li><a href="a9a994f367"><code>a9a994f</code></a> improve performance by stop using the mapFn param on Uint8Array.from constructor</li>
<li>See full diff in <a href="https://github.com/dankogai/js-base64/compare/3.7.4...3.7.5">compare view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=js-base64&package-manager=npm_and_yarn&previous-version=3.7.4&new-version=3.7.5)](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/4519

Reviewed By: mweststrate

Differential Revision: D43305193

Pulled By: ivanmisuno

fbshipit-source-id: e10eb134c079951e325c1f4d627eb1e60510c12d
2023-02-16 06:33:32 -08:00
Pascal Hartig
18b6ce6f24 Dep bump
Summary: Combining a bunch of individual tasks for dep upgrades into one diff.

Reviewed By: ivanmisuno

Differential Revision: D42706074

fbshipit-source-id: 054b2545ad1295699f47f4c6eb5065b7b9a1d6a0
2023-01-25 04:35:09 -08:00
Pasquale Anatriello
b31f8c8755 Delete Litho timeMachine
Summary:
This plugin is rarely used and would need to be re-worked to work in a world where ComponentTree is not the only way of rendering a Litho hierarchy.
Deleting for now for simplicity

Reviewed By: adityasharat, passy

Differential Revision: D42573698

fbshipit-source-id: 0d9cd713b668e6fc79cd5cddcdcb9f24ed98f927
2023-01-20 10:19:06 -08:00
Luke De Feo
3722ac1fea Permanent search bar
Summary: Out of the box the library search has some issues. when search matches it steals focus from the input. Eventually we want to customise the rendering of the tree items anyway so this lays the foundation for taht

Reviewed By: antonk52

Differential Revision: D41336524

fbshipit-source-id: 194f67023edd0675cd9bd8d6134260439c6b2785
2022-11-24 09:23:16 -08:00
Hamdullah Shah
dbf3108c36 Fix Sidebar Size
Summary: Set width of sidebar for `main` position in `MasterDetail`.

Reviewed By: mweststrate

Differential Revision: D41493698

fbshipit-source-id: a9f4804256a7ee46ed32f367e8b21ff57dd484e0
2022-11-23 05:25:48 -08:00
Pascal Hartig
85fe53a9e2 Run date formatter test on unix only
Summary:
The test added in D41342194 (f1cbe7ed79) fails on Windows: https://github.com/facebook/flipper/actions/runs/3489945702/jobs/5840723948

Turns out this is a known issue: 1adcf2bc68/desktop/flipper-plugin-core/src/utils/__tests__/shallowSerialization.node.tsx (L228)

So, following the advice there and running it on unix only.

Reviewed By: lawrencelomax

Differential Revision: D41403510

fbshipit-source-id: e08ce4be58adf0547bffec50850c7c259b4e33d5
2022-11-21 03:39:40 -08:00