Prefetch Skeleton Loading on Indexes and Shows (#5545)

### Description
Prefetch Skeleton Loading on Indexes and Shows

### Refs
#4458

### Demo

https://jam.dev/c/a1ad04e1-80b6-4b2a-b7df-373f52f4b169

https://jam.dev/c/c5038b97-2f18-4c29-8dee-18c09376e5ee

Fixes: #4458

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
gitstart-twenty
2024-05-27 15:56:08 +08:00
committed by GitHub
parent cfd83d6b8e
commit 9c046dcfdb
60 changed files with 490 additions and 161 deletions

View File

@ -8,13 +8,14 @@ import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Integrations/SettingsIntegrationDatabase',
component: SettingsIntegrationDatabase,
decorators: [PageDecorator],
decorators: [PrefetchLoadingDecorator, PageDecorator],
args: {
routePath: getSettingsPagePath(SettingsPath.IntegrationDatabase),
routeParams: { ':databaseKey': 'postgresql' },

View File

@ -6,6 +6,7 @@ import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
@ -13,7 +14,7 @@ const meta: Meta<PageDecoratorArgs> = {
title:
'Pages/Settings/Integrations/SettingsIntegrationEditDatabaseConnection',
component: SettingsIntegrationEditDatabaseConnection,
decorators: [PageDecorator],
decorators: [PrefetchLoadingDecorator, PageDecorator],
args: {
routePath: '/settings/integrations/:databaseKey/edit',
routeParams: {

View File

@ -6,13 +6,14 @@ import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Integrations/SettingsIntegrationNewDatabaseConnection',
component: SettingsIntegrationNewDatabaseConnection,
decorators: [PageDecorator],
decorators: [PrefetchLoadingDecorator, PageDecorator],
args: {
routePath: '/settings/integrations/:databaseKey/new',
routeParams: { ':databaseKey': 'postgresql' },

View File

@ -8,6 +8,7 @@ import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
@ -15,7 +16,7 @@ const meta: Meta<PageDecoratorArgs> = {
title:
'Pages/Settings/Integrations/SettingsIntegrationShowDatabaseConnection',
component: SettingsIntegrationShowDatabaseConnection,
decorators: [PageDecorator],
decorators: [PrefetchLoadingDecorator, PageDecorator],
args: {
routePath: getSettingsPagePath(SettingsPath.IntegrationDatabaseConnection),
routeParams: {

View File

@ -8,13 +8,14 @@ import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Integrations/SettingsIntegrations',
component: SettingsIntegrations,
decorators: [PageDecorator],
decorators: [PrefetchLoadingDecorator, PageDecorator],
args: { routePath: getSettingsPagePath(SettingsPath.Integrations) },
parameters: {
msw: graphqlMocks,