Commit Graph

570 Commits

Author SHA1 Message Date
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
Pascal Hartig
f1cbe7ed79 Fix millisecond display for date formatting
Summary: If we have a milliseconds portion of a date that's <100, we'd fill in zeroes in a symmetrical way (around the value) rather than filling in at the front, which led to some confusion.

Reviewed By: mweststrate

Differential Revision: D41342194

fbshipit-source-id: a8f60110dcad8bfa77b81abed88df0b0643c780e
2022-11-17 05:32:02 -08:00
Lorenzo Blasa
587f428cf8 Allow plugins to use css
Summary:
Flipper plugins fail when importing css from third-party dependencies. This diff tries to fix that.

Effectively, the plugin can import the css and export it when is bundled.

When we load the plugin, we check if there's a css file for it. If there's one, we return it and try to use it.

Reviewed By: aigoncharov

Differential Revision: D40758178

fbshipit-source-id: e53afffcc481504905d5eeb1aea1f9114ee2a86b
2022-10-27 22:50:30 -07:00
Lorenzo Blasa
bb3b1cecef Simple antd types for each inspectable type
Summary:
Replace draft inspectors with read-only components.

This is a first step into having a richer UI. At the moment, these are read-only components but will likely be extended in the future as to allow editing of values.

Reviewed By: LukeDefeo

Differential Revision: D40345016

fbshipit-source-id: a6aef5861474b4aa8353c00ef257ab17b4cff00e
2022-10-25 03:09:00 -07:00
Guangming Mao
629bbe6c5a Highlight text in table row details
Summary: Add prop for highlight color in DataInspector

Differential Revision: D40464529

fbshipit-source-id: 7113592c192b12504c0691d95663208181c1ad8c
2022-10-19 10:35:39 -07:00
Lorenzo Blasa
85c4178c22 antd update
Summary:
^

allow-large-files

Reviewed By: mweststrate

Differential Revision: D40319006

fbshipit-source-id: 79fc39dfb967d780b947a5ef302abdd0be9b5ee6
2022-10-18 03:32:31 -07:00
Andrey Goncharov
27fd60b659 Ignore persistToLocalStorage in headless mode
Summary:
In a headless mode we do not have access to local storage. As a result, headless plugins that try to use `persistToLocalStorage` option crash. We should ignore the option for these plugins for now and add a way to persist the plugin state to the disk in a headless mode in the future.

CHANGELOG: Ignore persistToLocalStorage in headless mode

Resolves https://github.com/facebook/flipper/issues/4190

Reviewed By: lblasa

Differential Revision: D40341873

fbshipit-source-id: 40774c0024f79cf1652f24146fd16f6a101ca99e
2022-10-14 02:26:43 -07:00
Luke De Feo
9101603cf2 New nested hover implementation optimization
Summary:
A side affect of the new tree implementation was unecessary renders. For very large trees this was noticable to the user.

A condition is added to the props are equal function for the memoized component to consider if this nodes path is a prefix to the new or previous hover path. This indicates whether it needs to rerender or wether the change in hover state is unconsequential to this component.

changelog: Fixed a bug in the nested highlighting of the data inspector, previously it could remain highlighted while moving the mouse away quickly and multiple highlights could be visible at the same time

Reviewed By: mweststrate

Differential Revision: D39883905

fbshipit-source-id: abdac71574695000addb4ba6477503b7d44a4faf
2022-09-28 06:51:13 -07:00
Luke De Feo
8f9ac0d087 New implementation of nested hover
Summary:
There were 2 issues with the previous implementation of the nested hover.
1. If you moved the mouse out of the inspector quickly we would miss the event and we would have a hover state of the root element when we shouldnt
2. The hover state was stored per node, it was possible to have mulitple children hovered at the same time if you moved the mouse fast enough in a very complex tree

The new implementation has the hovered id stored in the Datainspector root. This solves the multiple state issue since there can only be one.  Finally There is an onMouseLeave hook added to the parent div which seems to reliably fire no mouse how erractic my mouse movements :) Also the new implementation is a lot easier to understand

Reviewed By: mweststrate

Differential Revision: D39855733

fbshipit-source-id: 96b43f216deef72b81cd52001f8de26df55ea693
2022-09-28 06:51:13 -07:00
Andrey Goncharov
d1158e2d02 Configure eslint to prevent imports from nested paths of externally provided modules
Summary: We have a list of modules that we do not bundle with the plugins, but provide externally to them from Flipper. For the mechanism to work correctly, we have to stop importing from nested paths of these modules.

Reviewed By: mweststrate

Differential Revision: D39776237

fbshipit-source-id: 06eae9bf9d5b11b48d2720bf592bfea749773847
2022-09-26 09:42:33 -07:00
Andrey Goncharov
650ff4bcfb Remove plugin bundling
Summary: Remove the notion of bundled plugins

Reviewed By: lblasa

Differential Revision: D39308888

fbshipit-source-id: aa88ddbf2801ad1da95f89e4c761259b697b0d66
2022-09-15 10:02:19 -07:00
Andrey Goncharov
97b8b8a1c4 Split flipper-plugin package
Summary:
flipper-server-companion depends on flipper-plugin. flipper-plugin includes dependencies that run only in a browser. Splitting flipper-plugin into core and browser packages helps to avoid including browser-only dependencies into flipper-server bundle.
As a result, bundle size could be cut in half. Subsequently, RSS usage drops as there is twice as less code to process for V8.

Note: it currently breaks external flipper-data-source package. It will be restored in subsequent diffs

Reviewed By: lblasa

Differential Revision: D38658285

fbshipit-source-id: 751b11fa9f3a2d938ce166687b8310ba8b059dee
2022-09-15 10:02:19 -07:00
Andrey Goncharov
a9fe381076 Add more detailed errors for assertConnected
Differential Revision: D39383946

fbshipit-source-id: e11a29c77c5abe7f3fee5e979c596efd31ef4ec2
2022-09-09 06:30:04 -07:00
Michel Weststrate
075c9e1dda Disable NUX animations
Summary:
I noticed that on my Mac M1 Flipper feels really sluggish in term of interactions compared to my Mac Pro. Started profiling and notices we have continously 60 reflows/sec and a very continous stream of DOM nodes allocations. This in turn is caused by our NUX elements, whose opacity anymation causes a reflow, which causes our interactive container (used for resizable sidebars etc) do to some calculations.

This is quite noticeble in how fluent clicks etc are handled, as long as there are NUX-es open. Not sure why this doesn't feel as bad on Intel machines, but alas the effect is very clearly visible in the performance monitor. Or when dismissing all NUX-es, which drops the performance issue even in current builds.

Disabling the opacity anymation and giving it a fixed value, fixes the issue as well, which is done in this diff.

Changelog: Minor improvements on M1 machines

Reviewed By: passy

Differential Revision: D38859406

fbshipit-source-id: 3b97c6c8444290e2a0a8b17b175de9e44159e258
2022-08-19 04:28:43 -07:00
Feiyu Wong
02c21f5cb0 Changed documentation with DataSource to be up to date
Summary: Since there were large refactoring's done to `DataSource` during the milestone for side-by-side panels, wanted to update some of the documentation as well so that the information is accurate and up to date.

Reviewed By: mweststrate

Differential Revision: D38541404

fbshipit-source-id: a6ba472f881fb8cbfa90ff5ac295a0b87c595080
2022-08-12 08:47:06 -07:00
Lorenzo Blasa
a357e280c2 Fix highlight selection background colour
Summary: There was a regression in which the selection background color made the selection hard to read in dark mode.

Reviewed By: mweststrate

Differential Revision: D38572894

fbshipit-source-id: c46d384175132112e1223434534a379318bfa2ea
2022-08-10 04:13:11 -07:00
Andrey Goncharov
f132d95bee Fix crash reporter
Summary: Changelog: Make crash reporter pick up and parse .ips crash reports

Reviewed By: LukeDefeo

Differential Revision: D38355089

fbshipit-source-id: dc1b46257ea12c2e67d8a9baab7f35a905be2204
2022-08-02 10:08:35 -07:00
Feiyu Wong
a47528a726 Icon in search bar to show/hide search results
Summary:
1. Added icon to search bar to manually trigger the hide/show search context/results functionality, which was only triggerable by ctrl(now migrated to ctrl+t) before.
2. Added tool tips to increase visibility of keyboard shortcuts

Changelog: Added icon for showing search result context(only triggered by keyboard shortcut before). Added tool tips to search bar icons.

Reviewed By: mweststrate

Differential Revision: D38207087

fbshipit-source-id: a34c1322294ed8091ea3f90d2f1f206af981c9ca
2022-07-27 12:19:51 -07:00
Feiyu Wong
499275af8a Add keyboard shortcut to support quick selecting recent searches
Summary:
Currently there's no way of quickly selecting recent searches other than manually opening the recent search history and then clicking one of the search terms. This diff seeks to add a new feature that would allow not only a keyboard short cut to open the recent search history drop down but also number the most recent 5 search terms so that the user could quickly select them with a number on their keyboard

Additionally, fixed bug found in terms of the search bar not showing the current search value correctly

`Changelog`: Introduced keyboard shortcut(ctrl + f) option to toggle the search history dropdown along with numbers attached to the options in order to quickly navigate to recent search terms. Have to first enable the option(search shortcut) in menu in order to use the feature. Also added a new button in the options menu that would trigger the search result toggle as triggered by the keyboard shortcut `ctrl` before(`ctrl` + `t` now)

WARNING: The current behavior of "ctrl" toggling back and forth to focus the selected item has been migrated to "ctrl + t" key combo

Reviewed By: mweststrate

Differential Revision: D37685738

fbshipit-source-id: a7ac4dd3dceb846a98258de2d884ebc279ee5995
2022-07-27 11:37:59 -07:00
Feiyu Wong
3fbf1215ec Refactored DataView to be the primary data driver for DataTable instead
Summary:
In order to accomplish multi-panel mode, we need to use multiple data views on the same data source so that the filters can be applied differently, etc.

This diff serves to refactor DataTable and some of its associated classes to use DataView as the primary driver for data management. Additionally, the diff refactored the state to allow multi-paneling to be on the DataPanel layer instead of the DataTable layer for ease of usage

This is the last diff of the larger stack which introduces the multi-panel mode feature. A possible next step could be allowing infinite(up to a certain limit) panels to be populated.

Changelog: Introduced side by side view feature for `DataTable`. There is now a new boolean for `DataTable` props called `enableMultiPanels`. If this is passed in, then the table will have an option to open a different "side panel" using a completely different dataview which allows different filters, searches, etc.

Reviewed By: mweststrate

Differential Revision: D37685390

fbshipit-source-id: 51e35f59da1ceba07ba8d379066970b57ab1734e
2022-07-22 09:16:37 -07:00
Andrey Goncharov
f3cb9de5c9 Fix Sidebar resizing handler propagation
Summary: SidebarInteractiveContainer sets mousedown/mouseup handlers. Whenever user tries to select text in child element those are triggered.

Reviewed By: passy

Differential Revision: D37994014

fbshipit-source-id: 5dcf5642b3a92ec50008aa4aad6b9522a09c1527
2022-07-20 06:01:10 -07:00
Feiyu Wong
53b89f485a Add Toggle to control showing full search history instead of filtered list
Summary:
This diff adds a new menu option to the Logs plugin which allows for enabling/disabling the automatic filtering of search terms in the search history as user types.

Additionally, fixed bug regarding the search term that's used is not actually showing correctly. This is caused by the search value being set in the input search bar instead of the autoComplete component level

Differential Revision: D37555209

fbshipit-source-id: 8a76299f7e1a4b0a3adfa6a4dd883d17f1e7a442
2022-07-14 06:21:45 -07:00
James Wysynski
5551cf3bb2 Fix tab names [again]
Summary: child.hasOwnProperty -> child.props.hasOwnProperty for tabs

Reviewed By: udat

Differential Revision: D37751552

fbshipit-source-id: 78015bbc185387587ce3644c959596cf0a661ddf
2022-07-11 06:40:31 -07:00
Luke De Feo
0e11eaabb3 Finishing touches
Summary:
A few comments in my rewrite stack got missed, I am addressing them here.
In addition react testing library has been hoisted to the root module in the project and been made available to all sub modules

Reviewed By: mweststrate

Differential Revision: D37712339

fbshipit-source-id: 60984c3d16bd535b0c489570907f097c7d80f634
2022-07-11 05:15:25 -07:00
Luke De Feo
4e2e23e3b4 Added ability to override device paramters in Deviceplugin test utils
Summary: This allows for more controlled device plugin tests

Reviewed By: mweststrate

Differential Revision: D37609991

fbshipit-source-id: 7e0694ba97e6b2c34b5d9cd81761eecd2f50c6f9
2022-07-07 07:50:14 -07:00
Luke De Feo
749abfeff2 Expose device description in device interface
Summary: This is needed to avoid mobile builds depending on BaseDevice

Reviewed By: mweststrate

Differential Revision: D37315909

fbshipit-source-id: a090bd3e76ceefe1f2ac68f832ee544ae45a8d6a
2022-07-07 07:50:14 -07:00
Luke De Feo
6c5faf2932 Add command to install app to flipper server
Summary: There is a new flipper server command to install apps. For android it uses adb (via adb kit) For ios depending on idb availablity it will use idb or xcrun. Consumed in the next diff

Reviewed By: lblasa, aigoncharov

Differential Revision: D36936637

fbshipit-source-id: e09d34d840a9f3bf9136bcaf94fb8ca15dd27cbb
2022-07-07 07:50:14 -07:00
James Wysynski
0016b72b37 Add hasOwnProperty checks for child fields in Tabs
Summary:
Add hasOwnProperty checks for child props in Tabs. This prevents warning output when a prop doesn't exist.

{F748481722}

Reviewed By: mweststrate

Differential Revision: D37520888

fbshipit-source-id: 3b0c9fb1e94e76ecb4eb52e97d2f3aa010cb60ce
2022-07-04 09:24:57 -07:00
Michel Weststrate
d162bcc2a4 Fix sorting order of selection during exports
Summary:
See https://fb.workplace.com/100051336486185/videos/469885544533059/

I couldn't reproduce it myself, but it is reported that when copying logs, the order of the selection is not preserve. Diving into the example there is a block of rows (around the 1.09 timestamp) that appear 'too early' in the output.

In flipper we sort the selection before copying the data by row index. This is to make sure if the user has multiple selections, they appear in the order of the logs (including any applied sorting), rather than in the order of which the user selected them.

However, when sorting numbers, JavaScript by coerces them to strings first (wtf JS), so the issue can be prevented by explicitly providing a sort function. Proof: {F749329864}

Reviewed By: lblasa

Differential Revision: D37596975

fbshipit-source-id: 820e03350034e7af8148200a58a8c858b358acd8
2022-07-04 04:13:04 -07:00
Luke De Feo
1353e0630b Fix free text search
Summary:
In diff D36663929 (e07d5c5bfe) the behaviour of data table was changed so that it only searched fields that were columns in the table. Due to user request we are restoring the functionality where you can search and it will look in all top level fields in the underlying object for the row

changelog: Fixed 'free text search' for data table. E.g network plugin

Reviewed By: mweststrate

Differential Revision: D37552492

fbshipit-source-id: 00ec942b2a2336c19a7d067d85cc6c81b8a175e1
2022-07-04 00:49:36 -07:00
Andrey Goncharov
f8763f95fa Call onSelect when a DataSource item changes
Summary:
Currently, we call onSelect in DataTable only when user changes their selection. At that moment, we pass the row data to the `onSelect` callback. However, if later the data changes, but the selection stays the same, we do not call `onSelect` again. As result, any listener to onSelect does not receive the latest data.
In this diff, we start calling `onSelect` when the selection does not change, but the underlying data does.

Reviewed By: mweststrate

Differential Revision: D37520346

fbshipit-source-id: a88d34654e9ad0721caf5918dde49b86ba20fc1f
2022-06-30 07:01:54 -07:00
Feiyu Wong
f46cf2b0ce Added color options for highlighting search terms
Summary:
This diff builds on the previous ones by enabling other colors to be used as highlights for the search terms. Current color options are: yellow(default), red, blue, green. Possible extensions to this feature could include allow the user to enter a custom hex-color string and use that as the highlight color.

Changelog: DataTable will now have option to have its search terms highlighted in the search results by toggling and customizing the highlight colors in the menu bar

Reviewed By: mweststrate

Differential Revision: D37383163

fbshipit-source-id: c81e383c0570ef5efbf3171b92b81a8fb2e55ea7
2022-06-29 10:36:52 -07:00