Summary:
Added a mouse hover state to detail inspector. The hover state follows you into and out of the hierarchy.
changelog: Added hover state to detail inspector
Reviewed By: mweststrate
Differential Revision: D36781553
fbshipit-source-id: eafbf119a81779bf07199142d305b06ad6b98c52
Summary:
Previously if you activated context menu in detail inspector it would trigger a context menu for multiple
overlapping children. This behaviour can be observed in live by right clicking a nested property an selecting 'Copy value'.
Most of the time you will copy the entire tree as you are clicking on the parents context menu. This is
the solution recommended by the antd team. https://github.com/ant-design/ant-design/issues/33865 (see the
response fiddle from the maintainer)
changelog: Fixed bug when copying value from context menu in detail sidebar
Reviewed By: mweststrate
Differential Revision: D36781555
fbshipit-source-id: 010a04648eb90eb19a47aa0f1f2b0427c9f5f7cc
Summary:
Getting the behavior exactly right was tricky, now settled on the following:
* Don't automatically show the search history (the default) but introduce an explicit button to toggle it, as opening it by default was pretty obtrusive in testing
* Items are added to the history when using return / explicitly clicking search, to only get "clean" entries into the history, and not half complete searches. Needing to press enter might be to subtle since datatable will also search without that, but not searching on keypress felt as a regression as well.
* Introduced a menu item for clearing the search history
* Search history is persisted like search filters.
Yay to Antd's AutoComplete, which is really straightforward and cleanly composes with Input.Search.
Changelog: DataTable will now keep a history of search items when hitting <return> to search. Use the history button to bring up the history.
Reviewed By: aigoncharov
Differential Revision: D36736821
fbshipit-source-id: 8d18b85308a39bd1644057371040855d199545c7
Summary:
The `Control` button press, that hides the current search filter, had some specific logic to make sure that the current selection remained visible. Since this is now generically supported, this is no longer needed.
Also updated the `Control` button behavior to also toggle back the search filter if needed, which was never finished in the original implementation.
Changelog: DataTable: pressing the control key can be used to temporarily turn the current search filter on and off.
Reviewed By: aigoncharov
Differential Revision: D36736494
fbshipit-source-id: 2c4949efa0d6935735f61ee43f9268b7e27d1fcf
Summary:
During filter changes, DataTable would loose any selections made, which was posted multiple times as papercut
I didn't implement preserving multi line selections. That should be straightforward, but wasn't sure that'd be desirable or not.
Changelog: DataTable: Data tables will now preserve the current selection and scroll it into view when changing the search filter.
Reviewed By: aigoncharov
Differential Revision: D36736496
fbshipit-source-id: 401ef351c847f58a5d411cf9f352390f6a110b24
Summary:
DataTable selected rows are a bit hard to spot when changing search, scrolling etc, so give them a bit more prominent background
Changelog: DataTable: more pronounced background color for selections
Reviewed By: aigoncharov
Differential Revision: D36736495
fbshipit-source-id: 2cab9eb99594ffaaccdd9ebe0d922691adb27bdc
Summary:
This adds support for the key of DataTableColumn to be a dotted path into a nested object, e.g foo.bar. Currently the typescript types only allow a top level key to be set, making this feature currently unusuable from plugin code.
While this could be addressed in a future commit the intention of this is to allow the user to add custom fields into their table columns at run time
Note there is a side effect to free text search from this commit. Previously it would search all top keys in the object. Now it will only search in columns that are in the table.
changelog: Searching data table will now only search columns in the table, rather than all top level attributes of the object
Reviewed By: mweststrate
Differential Revision: D36663929
fbshipit-source-id: 3688e9f26aa7e1828f8e9ee69f8e6f86268c8a54
Summary:
When filter is applied for the first time we shouldn't debounce to avoid "flashing" on datatable loading when it is first loaded without filter and then filter applied after 250ms.
Changelog:
Fixed flashing on opening datatable-based plugin with a filter.
Reviewed By: timur-valiev
Differential Revision: D36602929
fbshipit-source-id: 8bd33f50c92036f2a5565f636f4f2fbe69d900f2
Summary:
As we persist column filters between sessions - sometimes it's not obvious that they are applied.
This diff adds "Reset filters" action just near message "No records match the current search / filter criteria" to make it obvious that some records are hidden because of filters and let user quickly disable filters to see all items.
The same action also added to datatable's context menu.
Changelog:
Quick action "Reset filters" for datatable-based plugins which is shown in context menu and in empty table when all items filtered out.
Reviewed By: timur-valiev
Differential Revision: D36600535
fbshipit-source-id: 782e7f863f2f52d7f6017685bdebcb1feeb97dbd
Summary: Required for companion in later diffs
Reviewed By: passy
Differential Revision: D36517737
fbshipit-source-id: ad47ae00cc88f424507284553c7d4eb430691311
Summary: Expose uuid from flipper-common as it is required in multiple packages
Reviewed By: lblasa
Differential Revision: D36441889
fbshipit-source-id: 1fa539cb437976dbefe7d5d9a52e5e098a6402a7
Summary: Some intern plugins use it, an dit is currently missing in FlipperLib
Reviewed By: timur-valiev
Differential Revision: D36313032
fbshipit-source-id: 5ea8e250f1d0bc8831727abd883d953286a022d4
Summary:
As reported in https://fb.workplace.com/groups/flippersupport/permalink/1346149929198995/, data updates would sometimes not render in DataTable. After some debugging, this happens when multiple updates are scheduled with high frequency, and is bug in the internal render scheduler. (it might be that this never triggered before React 18, but it was a lingering bug).
Basically in the following sequence, no second render of the data table would happen:
1. emit update
2. schedule render
3. React renders
4. emit a second update
5. scheduler bails out because update is already scheduled
6. React useEffect will clear out the scheduler state that was causing the render at point 3.
Now the second update never gets rendered out (well, not until something else causes a new render).
The problem here is that the scheduler state should be immediately reset as soon as React starts rendering, so that any new incoming update should trigger a new render, even though useEffect of the first render didn't finish. New flow now becomes:
1. emit update
2. schedule render
3. React renders & clears out scheduler state
4. emit a second update
5. scheduler schedules fresh render
6. etc...
Reviewed By: nikoant
Differential Revision: D35501325
fbshipit-source-id: 8af58c0da7bb024f360b750c856865f220dc6272
Summary:
1. Identify if device supports screenshots/screen recording when it is created.
2. Disable screen recording/screenshot buttons when they are not supported
Reviewed By: passy
Differential Revision: D34611133
fbshipit-source-id: 82ad2d67e4af482d9becf7995187667b5d99bc36
Summary:
Combining a bunch of dependabot PRs.
N.B. I had to manually clean up the `yarn.lock` a few times because some dependencies resolved to multiple version numbers, catching tsc off-guard.
allow-large-files
Reviewed By: nikoant
Differential Revision: D34579180
fbshipit-source-id: a4848e1010ff240d9b0e721d3878585e7b4bd078
Summary: Flipper plugins rely on 'flipper-plugin' package being accessible from 'global'. Expose a subset (without UI stuff) of flipper-plugin to server add-ons
Reviewed By: mweststrate
Differential Revision: D34400811
fbshipit-source-id: e0079ddfa67e66c1b24ab02d7682917ddfc84aaf
Summary:
Adding a feature to Flipper's Logs plugin where:
1) you search for something,
2) click on a line among the filtered search results,
3) press control,
4) get taken back to unfiltered list of all messages, centered on your selected line
This is to help debugging where the user may add a print statement but the error happens after it, and it's difficult to catch without a lot of scrolling.
Reviewed By: mweststrate
Differential Revision: D33446285
fbshipit-source-id: 19aa472a12de074e561dbe37b44821fc29bf5c91
Summary:
Changelog: most data tables allow for horizontal scrolling now if they run out of space
This diff introduces support for horizontal scrolling in datatables. Originally thought about making this a view option, but doing automatically works actually quite fine. By default the columns resize as they did, but if either a column is made bigger or the window is so small no space is left, a horizontal scrollbar can be used.
This adresses several usability issues reported in GH / workplace
fixes https://github.com/facebook/flipper/issues/2608
Reviewed By: antonk52
Differential Revision: D33368216
fbshipit-source-id: 206c761a5873cf0396af091f2cbdedc3e638afac
Summary:
Changelog: Data tables will now remember their configuration by default and share it across different applications
As reported, column configurations were often not remembered across restarts. This was caused by two things
1. persisting config was by default turned off
2. the persistence key was based on pluginKey, that includes device and client identification, rather than purely the plugin name.
Reviewed By: cekkaewnumchai
Differential Revision: D33364780
fbshipit-source-id: 6c38182dc35e3cce23b858f931d554111b080c97
Summary:
changelog: Improved column widths in data tables
This diff fixes two issues:
1) dynamic width columns became invisible if there is too much else, and therefor it was hard to make them bigger or even notice them
2) column headers could be out of sync with the actually rendered rows, due to minor styling differences
Reviewed By: cekkaewnumchai
Differential Revision: D33364781
fbshipit-source-id: c3d47bb8db4af521859a5cbdf525d8ce39c71d00
Summary: In dev build there were tons of warnings on opening table context menu, because some items had same keys. This diff fixes that by differentiating item keys.
Reviewed By: mweststrate
Differential Revision: D33277520
fbshipit-source-id: aca2fa2f1163a2b6782be0ca4c5baebdecc5acd5