Summary: Removed back "prepack" script from every plugin package to keep it simple. Instead we will use `build-plugin` command defined in the root package.json (see next diff in the stack).
Reviewed By: mweststrate
Differential Revision: D22160252
fbshipit-source-id: cffb5df65b89df3fe390c051da0df797b3d16d2d
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1267
Bumped versions of all plugins to match current Flipper version 0.46.0.
Reviewed By: mweststrate
Differential Revision: D22042959
fbshipit-source-id: 37c169bfd1b90debb8f94c9465a345a015524158
Summary: All the plugins migrated to spec v2 to allow packaging/publishing them independently from Flipper releases.
Reviewed By: passy
Differential Revision: D22041384
fbshipit-source-id: 23bfaf724f771a57bd628b9ea1c4d37846534a93
Summary: Single quotes need to be double to be correctly recognized in queries. #thanks mweststrate for reminding me
Reviewed By: mweststrate
Differential Revision: D21908315
fbshipit-source-id: 6c13f9ddb527d1144cc3df90ba48bdb5f2ed4952
Summary:
In D21788243, John suggested the field should be calculated when needed not precomputed. This diff does so by moving calculation logic to the component and removing the field
This also fixes the crashing bug when switching to Structure tab, changing table, and switching back to Data tab.
Reviewed By: mweststrate
Differential Revision: D21906983
fbshipit-source-id: 5a9522a5ba3f504108282fb27deae25b5eadc693
Summary:
per title
Also, edit file to match tests
Reviewed By: mweststrate
Differential Revision: D21819748
fbshipit-source-id: b697ae9915c53162624ba90fc867676c9ca8733b
Summary: To be able to edit correct cell, identifiers are needed. Assume that the primary key is unique, this should be safe to allow the query to find exactly one row to edit
Reviewed By: jknoxville
Differential Revision: D21788239
fbshipit-source-id: b09d1b6da1b46cbc961f08010467e973546acbef
Summary: This diff adds edit button to detail sidebar to allow user to edit column he/she wants to
Reviewed By: jknoxville
Differential Revision: D21788243
fbshipit-source-id: 4bdcef62114d5a6282ba85bc2bd1b5d039322e50
Summary:
This logic relies on the logic on client side, specifically `SqliteDatabaseDriver.java` in specifying some keys to retrieve useful data in `currentStructure`. This will be error-prone if developer writes their own data driver which doesn't follow the same naming as the data driver used as model.
Also, this diff adds util file to deal with query for updating database on client side.
I decided to construct query clause on server side so that the client side change is not needed.
Reviewed By: jknoxville
Differential Revision: D21788241
fbshipit-source-id: cf9a920c3e5b7b29f619bc3f00e68616b3445cab
Summary: The different is small after the change from storing pre-rendered data to raw data. Hence, the diff changes it to match `currentPage` to ease the assignment (used in next diffs)
Reviewed By: jknoxville
Differential Revision: D21788245
fbshipit-source-id: 87bdbce33f0615bf31878797a74fce5d5969db7b
Summary: `'Execute'` action was previously used only for execute tab which assumed the input will come from the state. This changes so that it can take any input attached to parameters (more explanation about the design in <insert diff number>)
Reviewed By: jknoxville
Differential Revision: D21788244
fbshipit-source-id: 8fb8ecb8f8df84f4854f70432e7a1fdb531403e9
Summary: This diff helps obtaining metadata for using to edit row
Reviewed By: jknoxville
Differential Revision: D21788246
fbshipit-source-id: bf01eff8866c82f001575d59cc2886b6cdd39dc5
Summary:
This refactor has the following changes:
- Change way to store data: raw data instead of rendered data
- Move render function to separated function component file
- Remove repetitive pattern
Reviewed By: jknoxville
Differential Revision: D21739468
fbshipit-source-id: 1f7e7ae902c3b55f3863300aaed26c2adda898ac
Summary:
As suggested in the previous diff, I change the way to store row values. Now, (kinda) raw values are stored instead of processed values that can be used directly for `ManagedTable`. This simplifies logic in detail sidebar.
I'm not sure what the effect to performance.
Reviewed By: mweststrate
Differential Revision: D21621896
fbshipit-source-id: 472be3caa955ca32f876f81095af21e9c17cb159
Summary:
This allows long text to be seen on the sidebar in database plugin. Also, remove weird padding in the sidebar and separate sidebar component to a new file
Refactoring is in the next diff
Reviewed By: mweststrate
Differential Revision: D21550672
fbshipit-source-id: 3e80be16783719e18392fe3d8f8068caf9283f8f
Summary:
As mentioned in [the first comment in the Github issue](https://github.com/facebook/flipper/issues/989#issuecomment-616673590), we were mixing database `id` given from client and `index + 1` on server side. After investigating, most are used correctly; it searches `id` from given database `name`. However, there are a few (if not one) that, in my opinion, was used incorrectly. For example, [`tableOption`](https://fburl.com/diffusion/vlo7xbo1) assumed `id - 1` is the index, which is sometime incorrect.
This diff sorts the database listed from client by `id` before storing in the state.
Changelog: Fixed wrong order assumption on server side
Reviewed By: jknoxville
Differential Revision: D21496345
fbshipit-source-id: 5e15f776356b0357ac14fbde6c2a11efd76cd1e1
Summary:
- Add detail sidebar to data tab. This reuses `renderSidebar` from SQL tab
- `renderTable` function is moved into the component to easier access `renderSidebar`
Reviewed By: mweststrate
Differential Revision: D21406942
fbshipit-source-id: 5c79489a80931b1133c0a28ca5897a27ba9dd6b8
Summary:
Mainly convert `js` to `tsx`
Additional change:
- Try not to directly change object value in reduce function
- Add emotion styled when there is error using style prop directly
Reviewed By: nikoant
Differential Revision: D21406943
fbshipit-source-id: 30312fa0b0d2d70fa52c5ff9db747e1a83beb270
Summary: Returning arrays from render kills react-reconciliation and produces missing key warnings. Turned all array rendering methods to use Fragments, where I could find them.
Reviewed By: jknoxville
Differential Revision: D21178253
fbshipit-source-id: 85ddf8adfa79732ccbe68409fdcf150399455983
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/969
Added all public plugins as workspaces to the root package.json. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Changelog: Internals: plugins added as "yarn workspaces" into the root package.json to simplify dependency management between them
Reviewed By: mweststrate
Differential Revision: D20805231
fbshipit-source-id: e85c62d3195d1ea3c5c60def6ca12318a2b53466
Summary:
This gets us on the latest Prettier 2.x:
https://prettier.io/blog/2020/03/21/2.0.0.html
Notably, this adds support for TypeScript 3.8,
which introduces new syntax, such as `import type`.
Reviewed By: zertosh
Differential Revision: D20636268
fbshipit-source-id: fca5833d003804333a05ba16325bbbe0e06d6c8a
Summary:
Quick notes:
- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.
Close https://github.com/facebook/flipper/pull/915
Reviewed By: jknoxville
Differential Revision: D20594929
fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03