Commit Graph

509 Commits

Author SHA1 Message Date
Nicolas Beaussart
dbe350d087 platform(nx): import pro console into nx
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6122
GitOrigin-RevId: 7b36dcb51bf2b7c8dd8f514ceba5878f1c2757ca
2022-09-30 08:35:02 +00:00
Nicolas Beaussart
2f86f71d4d make the build outpout similar than before
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/6052
GitOrigin-RevId: 3f93eb14828057ce67bad6068e4c00f32e8b7c51
2022-09-27 11:49:49 +00:00
Matthew Goodwin
b3b9ff269a console: GQL Customization while tracking a table
## Description 🔖

This adds the ability to "customize & track" using the [new tracking ui](https://github.com/hasura/graphql-engine-mono/pull/5391).

A new button was added to implement this:

<img width="870" alt="Screen Shot 2022-09-16 at 12 37 14 PM" src="https://user-images.githubusercontent.com/49927862/190701948-1ad86717-f6be-4f67-8e0c-17b618790795.png">

## Solution and Design 🎨

This feature mostly makes use of components and hooks already created.

I was able to refactor some code to reduce code duplication and type duplication.

A few highlights on the refactor:

- `useTrackTable`, `useUntrackTable` and `useTrackSelectedTables` were all refactored into a single hook: `useTrackTable`. This hook has one main function but returns 4 wrapper functions: `trackTable`, `untrackTable`, `trackTables`, and `untrackTables`. This should make maintaining easier in the future.
- Synced up types between `MetadataTableConfig` and the customization form. Previously, the customization form had duplicated this same type, and there was some slight discrepancies between them.
- Modified `TableTrackingCustomizationModal` `onSubmit` return with a 2nd argument that's in the exact shape of `MetadataTableConfig` for convenience.
- Did some refactoring of the `DropDownMenu` component that should not interfere with anything. Exposed a few of the inner components for export and used these modular pieces in the current implementation. This ended up not being used in the feature, but left it in as it's a slight improvement.

I also added a function called `delayAsyncAction` [here](5e88262628/console/src/components/Common/utils/jsUtils.tsx (L416)) to create an artificial delay for `async` functions. This allows us to create a more confident UX when requests happen near-instantly. Introducing a tiny delay of around 300ms with good UI feedback (i.e. loading spinner) shows the user something is happening. I wanted to document this as I'm not sure it's something other will agree on. If it's against our UX philosophy, I can remove it, but I found it nice.

## Review Setup 💻

1. Run the code locally and go to `http://localhost:3000/data/v2/manage?database=YOUR_DATABASE_NAME_HERE`
2. You should see the new button as shown above to `Customize & Track`
3. Try it out with various field custom roots
4. Also try tracking and untracking tables both from the individual rows as well as the checkboxes as this logic was also modified in the refactor.

 ** I am not totally sure how much I need to put here for testing, I may want some help here from the team. **

## Review checklist. 📋

### Functionality

- [ ] Steps to verify console behaviour

### Tests

Going to open another PR for adding testing to the relevant areas. Will update this PR with a link once that's been done.

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5922
GitOrigin-RevId: e7c14be5b9bcc255a7b9ecfd43f1f84aa8aabba2
2022-09-26 22:02:40 +00:00
Daniele Cammareri
f34bd93e9c console: remove allow list feature flag
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5889
GitOrigin-RevId: b9a3bab2bd83edb94137603850b405df1766e43b
2022-09-18 15:39:51 +00:00
Nicolas Beaussart
ad18266a3c frontend: dev server config
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5668
Co-authored-by: Nicolas Inchauspe <710410+nicoinch@users.noreply.github.com>
GitOrigin-RevId: c4915e445be9d95bcb4c76679f534ea80d52e3d3
2022-09-05 15:37:05 +00:00
Nicolas Inchauspe
b53cc2e81c console: add storybook and tailwind to console-legacy-oss
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5590
GitOrigin-RevId: 911fa2b8f59383fc10a08afac3138aacfe0927d3
2022-08-30 08:04:31 +00:00
Nicolas Inchauspe
6ca1fea4bf Migrate ALL buttons to new Button component
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5406
Co-authored-by: Erik Magnusson <32518962+ejkkan@users.noreply.github.com>
GitOrigin-RevId: c6eb23f5820ea4fe2ee23bf323ba81cd20d152e0
2022-08-22 14:48:14 +00:00
Nicolas Beaussart
38ffe84ce3 platform(nx): initial oss migration
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5429
GitOrigin-RevId: 3df08906d9c3cd6a9f75b933469bce4782c4a8d5
2022-08-18 19:37:56 +00:00
Nicolas Beaussart
79d9be5669 frontend: initial nx generation
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/5355
GitOrigin-RevId: b54bb378389ab4fae1fdf6b5a5cc97d1fd6abaf9
2022-08-05 18:53:54 +00:00