Commit Graph

14 Commits

Author SHA1 Message Date
Anton Nikolaev
3586f8ebbb UI Conversion: extracted plugin UI root component into a separate file
Summary: Extracted plugin UI root coomponent to a separate file to avoid falling back to full reloads even when "--fast-refresh" flag provided

Reviewed By: mweststrate

Differential Revision: D28119498

fbshipit-source-id: 18ef891512cbe5ddc34cacf7010dfd82f86c4fcc
2021-04-30 09:38:15 -07:00
Anton Nikolaev
45397fd2f4 UI Conversion: use DetailsSidebar from "flipper-plugin"
Summary: Use DetailsSidebar from "flipper-plugin"

Reviewed By: mweststrate

Differential Revision: D28110484

fbshipit-source-id: 0b9e3c07fc642242f2846f024895e740078779f7
2021-04-30 09:38:15 -07:00
Anton Nikolaev
368dd4a5ab Remove Value/renderValue public API from "flipper"
Summary:
Moving Value/renderValue API to "database" plugin as these APIs used exclusively by this plugin.

Alternative to that could be moving this API to "flipper-plugin" instead, but I think it doesn't make sense to expose public API which is only used in one plugin.

Reviewed By: mweststrate

Differential Revision: D28110483

fbshipit-source-id: 1576444681c1e0531fe45f0c15f442d65a28f803
2021-04-30 09:38:15 -07:00
Anton Nikolaev
23102b1997 UI Conversion: Use DataTable to show DB table structure
Summary: Use DataTable to show table structure

Reviewed By: mweststrate

Differential Revision: D28110485

fbshipit-source-id: 81f843a4763e1fbf5acf870621bc9049f719fd2c
2021-04-30 09:38:15 -07:00
Anton Nikolaev
84b48ff7e9 UI Conversion: Cleanup margins / paddings
Summary:
Cleaned up margins and paddings by removing hardcoded values and use constant sizes from "themes" instead.

Changelog: Database plugin UI aligned with the new Flipper UI

Reviewed By: mweststrate

Differential Revision: D28094217

fbshipit-source-id: 6514b2f1ea7073ca658a86e49c2be029f054ddf0
2021-04-29 12:04:04 -07:00
Anton Nikolaev
e1afe9d6b9 UI Conversion: Use TextArea from antd
Summary: Replaced Text and TextArea components by antd analogues

Reviewed By: mweststrate

Differential Revision: D28088959

fbshipit-source-id: 87f867f04f34a9b026045b34467a35437d132317
2021-04-29 12:04:04 -07:00
Anton Nikolaev
71d827288f UI Conversion: Replace buttons and dropdowns to antd analogues
Summary: Replaced favorite query dropdown to antd analogue

Reviewed By: mweststrate

Differential Revision: D28089366

fbshipit-source-id: 0d6e01bf6169f100ba7c9e612f0da8240ca3218d
2021-04-29 12:04:04 -07:00
Anton Nikolaev
1a315c510e UI Conversion: Switched ButtonGroup to Radio
Summary: Switched button group to Ant's radio buttons

Reviewed By: mweststrate

Differential Revision: D28068173

fbshipit-source-id: bcde8f32d76f76c18cf8bc8c8742bc3e01c54c7c
2021-04-29 12:04:04 -07:00
Anton Nikolaev
f743bd68a1 UI Conversion: Use Select from antd
Summary: Used Antd's Select component instead of the old one. In addition to that also enabled search in Select which can be quite handly as there might be many databases / tables.

Reviewed By: mweststrate

Differential Revision: D28068179

fbshipit-source-id: 4ff337a532e035c8b53a23858b5ba6d900e65ebd
2021-04-29 12:04:04 -07:00
Anton Nikolaev
24ac075d76 UI Conversion: Replaced all usages of FlexRow / FlexColumn to Layout
Summary: Replaced all usages of FlexRow / FlexColumn to new Layout component

Reviewed By: mweststrate

Differential Revision: D28055698

fbshipit-source-id: ad50762b068c897e5c4c182ac2d575d7e3a5f166
2021-04-29 12:04:04 -07:00
Anton Nikolaev
00fb573ba2 Extracted and memoized components
Summary: Just small refactoring to extract / memoize some of components

Reviewed By: mweststrate

Differential Revision: D28055699

fbshipit-source-id: 3d689a4e41e3f3c4c4e2e8cc2887cb255b4c4dc2
2021-04-29 12:04:04 -07:00
Anton Nikolaev
c4887e638b Fixed adding queries to favorites
Summary: I found a bug after migration to Sandy. It is now not possible to add queries to favorites. This diff fixes the issue.

Reviewed By: mweststrate

Differential Revision: D28066435

fbshipit-source-id: 129a62dab9521160f8957abba70e5c7a6e609839
2021-04-29 01:27:54 -07:00
Anton Nikolaev
c2a07e7638 Databases plugin migrated to Sandy functional API
Summary: Converted Databases plugin to Sandy functional API

Reviewed By: mweststrate

Differential Revision: D27999205

fbshipit-source-id: e9d2c7aa5858b9da3c1672efbb558fb6b1077b6b
2021-04-27 09:31:11 -07:00
Anton Nikolaev
b3274a8450 Plugin folders re-structuring
Summary:
Here I'm changing plugin repository structure to allow re-using of shared packages between both public and fb-internal plugins, and to ensure that public plugins has their own yarn.lock as this will be required to implement reproducible jobs checking plugin compatibility with released flipper versions.

Please note that there are a lot of moved files in this diff, make sure to click "Expand all" to see all that actually changed (there are not much of them actually).

New proposed structure for plugin packages:
```
- root
- node_modules - modules included into Flipper: flipper, flipper-plugin, react, antd, emotion
-- plugins
 --- node_modules - modules used by both public and fb-internal plugins (shared libs will be linked here, see D27034936)
 --- public
---- node_modules - modules used by public plugins
---- pluginA
----- node_modules - modules used by plugin A exclusively
---- pluginB
----- node_modules - modules used by plugin B exclusively
 --- fb
---- node_modules - modules used by fb-internal plugins
---- pluginC
----- node_modules - modules used by plugin C exclusively
---- pluginD
----- node_modules - modules used by plugin D exclusively
```
I've moved all public plugins under dir "plugins/public" and excluded them from root yarn workspaces. Instead, they will have their own yarn workspaces config and yarn.lock and they will use flipper modules as peer dependencies.

Reviewed By: mweststrate

Differential Revision: D27034108

fbshipit-source-id: c2310e3c5bfe7526033f51b46c0ae40199fd7586
2021-04-09 05:22:00 -07:00