Summary:
Select multiple rows, and then right click, or use Ctrl-click.
This was broken, it was resetting the selection when this happened.
This fixes it.
Now after selecting multiple, what happens depends where you right-click.
If you right-click within the current selection, it stays selected and you can copy it.
But if you right-click outside the current selection, that row becomes the new selected set, and you will just be able to copy that one. This feels right to me.
Reviewed By: passy
Differential Revision: D15822668
fbshipit-source-id: 6a6cda8a8f16fec55cffa52c1c2ff958c86b3f43
Summary:
We in React VR were need newer Chrome DevTools version to make our plugin work properly. Chromium version with required fixes were shipped in electron 5.0.0.
This diff bumps electron version and explicitly allows node integration (accessing require, process and other node related functions from window object in index.html), because it was disabled by default in 5.0.0.
Reviewed By: jknoxville
Differential Revision: D15693539
fbshipit-source-id: 4f71a07b2afaa489aec46940c924f4ad30ad0413
Summary: React is printing errors saying not to use "Span", and booleans in html properties
Reviewed By: danielbuechele
Differential Revision: D15535593
fbshipit-source-id: e074137c89abfa69625b370087c9c18b579ff279
Summary:
As seen [here](https://fb.workplace.com/groups/230455004101832/permalink/623364598144202/?comment_id=623436418137020&comment_tracking=%7B%22tn%22%3A%22R%22%7D) using the primary key + CTRL to open the context menu, triggers the drag-select mode. This should not be the case. This diff changes the behaviour to:
- Not trigger the drag-select-mode, when openting the context menu using CTRL
- Select the current row, when performing a context click on it.
Reviewed By: jknoxville
Differential Revision: D15538057
fbshipit-source-id: d3d086c3d44618b2801e3a9b0646689c04fa32ff
Summary:
It was relying on hash keys to be in order, which obviously won't work. Logs plugin, on "copy message" was copying a timestamp instead.
Fixed by using the columnOrder state instead.
Reviewed By: danielbuechele
Differential Revision: D15535281
fbshipit-source-id: 2d7db95c16cc4f75c0d9cf14806fcc80cc8e4bd9
Summary:
Adds a plugin for listing the databases, tables and contents of those tables in an android app.
Right now, works with sqlite, but it should be generic enough to work with other db types.
## Changelog
Add initial version of android databases plugin
Creating a PR, I may need to do some cleaning up, but this is to kick off that process.
Pull Request resolved: https://github.com/facebook/flipper/pull/441
Reviewed By: danielbuechele
Differential Revision: D15288831
Pulled By: jknoxville
fbshipit-source-id: 6379ad60d640ea6b0a9473acc03dd6ea81a3a8d4
Summary: I added column size persistence when resizing manually, but broke initial column sizing when a prop is provided. This fixes it.
Reviewed By: passy
Differential Revision: D15392145
fbshipit-source-id: 53f79c520917cd571302502c8b75aa0475567cb9
Summary:
Previously you could only copy the entire row.
Now you can choose which cell to copy.
Not the perfect UI admittedly, but that would require a big change to make individual cells selectable. I think it's a definite improvement.
Reviewed By: passy
Differential Revision: D15231784
fbshipit-source-id: 0d52192a5bf4e8ea1ebee74988c749d3f602fea9
Summary: Allows for sort order to be preserved and applied from the start.
Reviewed By: danielbuechele
Differential Revision: D15182696
fbshipit-source-id: ad546ce35bf4637ca637589c6c3d6291a4313db7
Summary:
Adds a global inside managed table where, whenever a table key is provided, the column sizes are stored.
Then if a new table is constructed with the same key, it will get the sizes from before.
Reviewed By: danielbuechele
Differential Revision: D15181762
fbshipit-source-id: 98b5a14f8805075928cbe51511609b8b58c512fd
Summary:
Adding a property `horizontallyScrollable` the `ManagedTable` that enables horizontal scrolling, if that is required by the table's contents.
By default this behaviour is disabled to not break existing tables.
Reviewed By: jknoxville
Differential Revision: D15166144
fbshipit-source-id: 7a9b76facdbe717deb3d097e0b8883d4b0732d51
Summary:
1. Added onSort() pass-through to ManagedTable which allows to handle sort order changes.
2. columnOrder now gets updated when the corresponding prop is changed indepedently from ref.
Reviewed By: danielbuechele
Differential Revision: D14147857
fbshipit-source-id: 03300629a3316a69be6b745810516966b8060aa6
Summary: Soves the bug which caused the multiselection to clear off when one did ctrl+click
Reviewed By: jknoxville
Differential Revision: D14103906
fbshipit-source-id: 834d79e1c86a89b4d90c26e8db1850c1e8712a5d
Summary:
Upgrading to flow 0.91, fixing a bunch of `$FloxFixMe`s that were introduced by upgrading to 0.86.
Also fixing some linting issues.
Reviewed By: priteshrnandgaonkar
Differential Revision: D13900794
fbshipit-source-id: 5d0a1b62371f3b5d34b909bae0876583acb6f977
Summary:
This patch add a new prop on ManageTabled called buildContextMenuItems. It allows
to override the current context menu when right click on the ManagedTable rows.
Pull Request resolved: https://github.com/facebook/flipper/pull/352
Reviewed By: danielbuechele
Differential Revision: D13590258
Pulled By: passy
fbshipit-source-id: a90887a97136818611102a2628361c84988efeac
Summary:
Moving the scrolling to highlightedRows from `componentWillReceiveProps` to `componentDidUpdate` to make sure the rows are rendered, when this method is called.
The method is called, whenever the highlighted rows change, and on the first update. The reason why this is called on the first update is described in an inline comment.
Reviewed By: passy
Differential Revision: D13376566
fbshipit-source-id: 311a1f430e08fcfb4e31b39a2c5b34910694917f
Summary: Allows to set the selected rows of a table using the `highlightedRows` property.
Reviewed By: passy
Differential Revision: D9850597
fbshipit-source-id: 62239192113f43ac257d7328b21b386b584a7cfb
Summary:
Removes the fix introduced in D9570518 and upgrading to `react-window@1.1.2` which fixes the problem in the library.
Also finetuning debounce times.
Reviewed By: passy
Differential Revision: D9582591
fbshipit-source-id: 92b008d29f96ce0f11f5cfb5d9e92175ae536ee2
Summary:
When starting with an empty table and adding rows, the scrollOffset of the table might end up with a negative value, which causes rows not to be rendered.
See https://github.com/bvaughn/react-window/issues/49 for more details.
This only calls `scrollToItem` when the table is actually scrollable to prevent a negative scrollOffset.
Reviewed By: passy
Differential Revision: D9570518
fbshipit-source-id: 5b08990a353a6d41d0f1bc5c1481d5a5e471bd94
Summary:
Table was missing support for some properties, that were supported previously, which caused some regressions. Support for the following properties was added:
- `multiHighlight: boolean = false`
- `autoHeight: boolean = false`
- `highlightableRows: boolean = true`
- `onRowHighlighted: Function`
Reviewed By: jknoxville
Differential Revision: D9549384
fbshipit-source-id: 1db2e7e8c6ad483d3d9d3a5814c76c564e9ba7f4
Summary: When table rows are chaning, we need to recaluculate all row heights. This was already done when filtering/searching, but there are other occurrences where we need to recalculate the heights (like clearing the table).
Reviewed By: passy
Differential Revision: D9540881
fbshipit-source-id: ef6e94c0330294d8196f946799a436aa5e9ce5c5
Summary:
My benchmarks have shown react-emotion to be faster than the current implementation of `styled`. For this reason, I am converting all styling to [emotion](https://emotion.sh).
Benchmark results:
{F136839093}
The syntax is very similar between the two libraries. The main difference is that emotion only allows a single function for the whole style attribute, whereas the old implementation had functions for every style-attirbute.
Before:
```
{
color: props => props.color,
fontSize: props => props.size,
}
```
After:
```
props => ({
color: props.color,
fontSize: props.size,
})
```
Reviewed By: jknoxville
Differential Revision: D9479893
fbshipit-source-id: 2c39e4618f7e52ceacb67bbec8ae26114025723f
Summary:
When changing the props of a table often, this might results in a lot of unnecessary rerenders. This could be mostly seen in the analytics plugin, which is sending a lot of messages in a short time.
The update of the table component is now debounced to only re-render every 150ms. This also affects searching and filtering and makes typing in the search input smoother.
Reviewed By: passy
Differential Revision: D9447722
fbshipit-source-id: 00e092e4e047e9c40e5a1ec2789644858acc18dd
Summary:
Tables were using a custom virtualization, which wasn't as performant as other solutions out there. In this diff, the table component is reworked for performance.
- removes `Table` component, because it was never used standalone, `ManagedTable` is what all plugins used
- uses `react-window` for `ManagedTable`
- reworks table highlighting and arrow-navigation to work with the new virtualization
- moves actual filtering out of `ManagedTable` into `Searchable` component for a better separation of concerns.
Reviewed By: jknoxville
Differential Revision: D9447721
fbshipit-source-id: 15eb2eb55eed9f49a0cb1ccfb2d748b3672fa898